xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #220: 0001-Fix-DesktopServer-s-get_transient_for-method.patch

File 0001-Fix-DesktopServer-s-get_transient_for-method.patch, 1.9 KB (added by Johannes Schindelin, 8 years ago)

Patch fixing the Firefox menu problem for me

  • src/xpra/server.py

    From 4a8bffbf6d974dbe9ffca175a8c972d8f76fe578 Mon Sep 17 00:00:00 2001
    From: Johannes Schindelin <johannes.schindelin@gmx.de>
    Date: Thu, 6 Dec 2012 15:14:53 -0600
    Subject: [PATCH] Fix DesktopServer's get_transient_for() method
    
    It really cannot work without a window -> id map, but that is an
    instance variable of the XpraServer, not of the DesktopManager. So
    let's pass it as a parameter into that method.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    ---
     src/xpra/server.py | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/xpra/server.py b/src/xpra/server.py
    index 8217d76..15cce7e 100644
    a b class DesktopManager(gtk.Widget): 
    131131                     "%sx%s vs %sx%s", w0, h0, w, h)
    132132        return x, y
    133133
    134     def get_transient_for(self, window):
     134    def get_transient_for(self, window, window_to_id):
    135135        transient_for = window.get_property("transient-for")
    136136        if transient_for is None:
    137137            return None
    class DesktopManager(gtk.Widget): 
    140140        for model in self._models.keys():
    141141            log("testing model %s: %s", model, model.client_window.xid)
    142142            if model.client_window.xid==transient_for.xid:
    143                 wid = self._window_to_id.get(model)
     143                wid = window_to_id.get(model)
    144144                log("found match, window id=%s", wid)
    145145                return wid
    146146        root = gtk.gdk.get_default_root_window()
    class XpraServer(gobject.GObject, XpraServerBase): 
    216216        self._wm.set_workarea(workarea.x, workarea.y, workarea.width, workarea.height)
    217217
    218218    def get_transient_for(self, window):
    219         return self._desktop_manager.get_transient_for(window)
     219        return self._desktop_manager.get_transient_for(window, self._window_to_id)
    220220
    221221    def is_shown(self, window):
    222222        return self._desktop_manager.is_shown(window)