Skip to content

Commit

Permalink
#2137 in readonly mode, don't send window state updates to the server
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@22527 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 23, 2019
1 parent 9b56dcb commit cb96d29
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def init_window(self, metadata):
self.connect_after("realize", self.on_realize)
self.connect('unrealize', self.on_unrealize)
self.add_events(self.WINDOW_EVENT_MASK)
if DRAGNDROP:
if DRAGNDROP and not self._client.readonly:
self.init_dragndrop()
self.init_focus()
ClientWindowBase.init_window(self, metadata)
Expand Down Expand Up @@ -781,6 +781,9 @@ def window_state_updated(self, widget, event):
self.update_window_state(state_updates)

def update_window_state(self, state_updates):
if self._client.readonly:
log("update_window_state(%s) ignored in readonly mode", state_updates)
return
if state_updates.get("maximized") is False or state_updates.get("fullscreen") is False:
#if we unfullscreen or unmaximize, re-calculate offsets if we have any:
w, h = self._backing.render_size
Expand Down Expand Up @@ -842,6 +845,8 @@ def cancel_window_state_timer(self):

def schedule_send_iconify(self):
#calculate a good delay to prevent races causing minimize/unminimize loops:
if self._client.readonly:
return
delay = 150
spl = tuple(self._client.server_ping_latency)
if spl:
Expand Down

0 comments on commit cb96d29

Please sign in to comment.