Skip to content

Commit

Permalink
re-set the modal flag on all windows after toggling the feature
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19906 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 10, 2018
1 parent c2d2ee1 commit 1eddcac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,11 +936,11 @@ def set_modal(self, modal):
#all other windows we manage from receiving input
#including other unrelated applications
#what we want is "window-modal"
log("set_modal(%s) modal_windows=%s", modal, self._client.modal_windows)
if not self._client.modal_windows:
statelog("set_modal(%s) swallowed", modal)
return
gtk.Window.set_modal(self, modal)
#so we can turn this off using the "modal_windows" feature,
#from the command line and the system tray:
mw = self._client.modal_windows
log("set_modal(%s) modal_windows=%s", modal, mw)
gtk.Window.set_modal(self, modal and mw)


def set_fullscreen_monitors(self, fsm):
Expand Down
7 changes: 7 additions & 0 deletions src/xpra/client/mixins/window_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ def cleanup(self):
log("WindowClient.cleanup() done")


def set_modal_windows(self, modal_windows):
self.modal_windows = modal_windows
#re-set flag on all the windows:
for w in self._id_to_window.values():
modal = w._metadata.boolget("modal", False)
w.set_modal(modal)

def set_windows_cursor(self, client_windows, new_cursor):
raise NotImplementedError()

Expand Down

0 comments on commit 1eddcac

Please sign in to comment.