Skip to content

Commit

Permalink
#3476 use a more generic interface
Browse files Browse the repository at this point in the history
use get_id() as an alias for get_property('xid')
  • Loading branch information
totaam committed Feb 28, 2022
1 parent 0ff8737 commit ad515d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpra/server/shadow/gtk_shadow_server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ def refresh_window_models(self):
return
xid_to_window = {}
for window in windows:
xid = window.get_property("xid")
xid = window.get_id()
xid_to_window[xid] = window
sources = self.window_sources()
for wid, window in tuple(self._id_to_window.items()):
xid = window.get_property("xid")
xid = window.get_id()
new_model = xid_to_window.pop(xid, None)
if new_model is None:
#window no longer exists:
Expand Down
3 changes: 3 additions & 0 deletions xpra/x11/shadow_x11_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def __init__(self, root_window, capture=None, title="", geometry=None):
except Exception:
self.xid = 0

def get_id(self):
return self.xid

def __repr__(self):
return "X11ShadowModel(%s : %24s : %s)" % (self.capture, self.geometry, self.xid)

Expand Down

0 comments on commit ad515d8

Please sign in to comment.