Skip to content

Commit

Permalink
if we can't get the window geometry, then we can't manage it
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@22078 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 13, 2019
1 parent 3f5391f commit 07dd55a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/xpra/x11/models/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,11 @@ def set_if_unset(propname, value):
super(WindowModel, self)._read_initial_X11_properties()
net_wm_state = self.get_property("state")
assert net_wm_state is not None, "_NET_WM_STATE should have been read already"
#initial position and size, from the Window object,
#but allow size hints to override it is specified
geom = X11Window.getGeometry(self.xid)
assert geom, "failed to get geometry for %#x" % self.xid
if not geom:
raise Unmanageable("failed to get geometry for %#x" % self.xid)
#initial position and size, from the Window object,
#but allow size hints to override it if specified
x, y, w, h = geom[:4]
size_hints = self.get_property("size-hints")
ax, ay = size_hints.get("position", (x, y))
Expand Down

0 comments on commit 07dd55a

Please sign in to comment.