Skip to content

Commit

Permalink
oops: python2 gobject still has problems.. we need to trap those weir…
Browse files Browse the repository at this point in the history
…d exceptions

git-svn-id: https://xpra.org/svn/Xpra/trunk@21728 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 19, 2019
1 parent 854bc99 commit c515c5a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xpra/x11/models/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,12 @@ def _read_initial_X11_properties(self):
def set_if_unset(propname, value):
#the property may not be initialized yet,
#if that's the case then calling get_property throws an exception:
if self.get_property(propname) in (None, ""):
self._internal_set_property(propname, value)
try:
if self.get_property(propname) not in (None, ""):
return
except TypeError:
pass
self._internal_set_property(propname, value)
#"decorations" needs to be set before reading the X11 properties
#because handle_wm_normal_hints_change reads it:
set_if_unset("decorations", -1)
Expand Down

0 comments on commit c515c5a

Please sign in to comment.