Skip to content

Commit

Permalink
#2351: more readable and consistent way of checking for the mixin
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@24913 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 5, 2020
1 parent cf3e023 commit 51eefa5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/xpra/server/mixins/window_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ def add_new_client(self, *_args):
minw, minh = self.window_min_size
maxw, maxh = self.window_max_size
for ss in tuple(self._server_sources.values()):
cmin = getattr(ss, "window_min_size", None)
cmax = getattr(ss, "window_max_size", None)
if not cmin or not cmax:
if not isinstance(ss, WindowsMixin):
continue
cminw, cminh = cmin
cmaxw, cmaxh = cmax
cminw, cminh = ss.window_min_size
cmaxw, cmaxh = ss.window_max_size
minw = max(minw, cminw)
minh = max(minh, cminh)
if cmaxw>0:
Expand All @@ -124,8 +122,7 @@ def update_size_constraints(self, minw, minh, maxw, maxh):
def send_initial_data(self, ss, caps, send_ui, share_count):
if not send_ui:
return
if not hasattr(ss, "new_window"):
#no window source mixin
if not isinstance(ss, WindowsMixin):
return
self.send_initial_windows(ss, share_count>0)
self.send_initial_cursors(ss, share_count>0)
Expand Down

0 comments on commit 51eefa5

Please sign in to comment.