xpra icon
Bug tracker and wiki

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


Changes between Initial Version and Version 1 of Ticket #252, comment 37


Ignore:
Timestamp:
04/24/13 10:55:40 (8 years ago)
Author:
Antoine Martin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #252, comment 37

    initial v1  
    4040--- src/xpra/server.py  (revision 3132)
    4141+++ src/xpra/server.py  (working copy)
    42 @@ -80,12 +80,18 @@
     42@@ -80,12 +80,20 @@
    4343 
    4444     def configure_window(self, model, x, y, w, h):
     
    5454+        s.geom = [x, y, w, h]
    5555         model.maybe_recalculate_geometry_for(self)
    56 +        aw, ah = model.get_property("actual-size")
    57 +        if aw!=w or ah!=h:
    58 +            log.warn("DesktopManager: updating model with new size: %sx%s", aw, ah)
    59 +            s.geom = [x, y, aw, ah]
     56+        asize = model.get_property("actual-size")
     57+        if asize:
     58+            aw, ah = asize
     59+            if aw!=w or ah!=h:
     60+                log.warn("DesktopManager: updating model with new size: %sx%s", aw, ah)
     61+                s.geom = [x, y, aw, ah]
    6062+        return s.geom
    6163 
    6264     def hide_window(self, model):
    6365         if not model.get_property("iconic"):
    64 @@ -509,7 +515,10 @@
     66@@ -275,7 +283,10 @@
     67 
     68 
     69     def _window_resized_signaled(self, wm, window):
     70-        nw,nh = window.get_property("actual-size")
     71+        asize = window.get_property("actual-size")
     72+        if asize is None:
     73+            return
     74+        nw,nh = asize
     75         geom = self._desktop_manager.window_geometry(window)
     76         log("XpraServer._window_resized_signaled(%s,%s) actual-size=%sx%s, current geometry=%s", wm, window, nw, nh, geom)
     77         geom[2:4] = nw,nh
     78@@ -509,7 +520,10 @@
    6579         assert not window.is_OR()
    6680         owx, owy, oww, owh = self._desktop_manager.window_geometry(window)
    6781         log("_process_configure_window(%s) old window geometry: %s", packet[1:], (owx, owy, oww, owh))
    6882-        self._desktop_manager.configure_window(window, x, y, w, h)
    69 +        aw, ah = self._desktop_manager.configure_window(window, x, y, w, h)
     83+        aw, ah = self._desktop_manager.configure_window(window, x, y, w, h)[:2]
    7084+        if abs(aw-w)>1 or abs(ah-h)>1:
    7185+            log.warn("actual window geometry HACK")
     
    7488             self._damage(window, 0, 0, w, h)
    7589         if len(packet)>=7:
    76 @@ -541,7 +550,7 @@
     90@@ -541,7 +555,7 @@
    7791         visible = self._desktop_manager.visible(window)
    7892         log("resize_window to %sx%s, desktop manager set it to %sx%s, visible=%s", w, h, ww, wh, visible)