Skip to content

Commit

Permalink
#1097: update the client window's geometry during the corral window r…
Browse files Browse the repository at this point in the history
…esize, this should be redundant but may not be

git-svn-id: https://xpra.org/svn/Xpra/trunk@11986 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 18, 2016
1 parent b9c9a5d commit 6eb37cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/xpra/x11/gtk2/models/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,23 +458,27 @@ def resize_corral_window(self, x, y, w, h, border):
hints = self.get_property("size-hints")
w, h = calc_constrained_size(w, h, hints)
geomlog("resize_corral_window() new constrained size=%ix%i", w, h)
cx, cy, cw, ch = self.get_property("geometry")
if cow!=w or coh!=h:
#at least resized, check for move:
if (x, y) != (0, 0):
self._internal_set_property("set-initial-position", True)
geomlog("resize_corral_window() move and resize from %s to %s", (cox, coy, cow, coh), (x, y, w, h))
self.corral_window.move_resize(x, y, w, h)
self.client_window.move(0, 0)
self._updateprop("geometry", (x, y, w, h))
else:
#just resize:
geomlog("resize_corral_window() resize from %s to %s", (cow, coh), (w, h))
self.corral_window.resize(w, h)
self._updateprop("geometry", (cx, cy, w, h))
#just position change:
elif (x, y) != (0, 0):
self._internal_set_property("set-initial-position", True)
geomlog("resize_corral_window() moving corral window from %s to %s", (cox, coy), (x, y))
self.corral_window.move(x, y)
self.client_window.move(0, 0)
self._updateprop("geometry", (x, y, cw, ch))

def do_child_configure_request_event(self, event):
geomlog("do_child_configure_request_event(%s) client=%#x, corral=%#x, value_mask=%s", event, self.xid, self.corral_window.xid, configure_bits(event.value_mask))
Expand Down

0 comments on commit 6eb37cd

Please sign in to comment.