diff --git a/src/xpra/client/gtk_base/gtk_client_window_base.py b/src/xpra/client/gtk_base/gtk_client_window_base.py index 9ad29b534a..56ef921efa 100644 --- a/src/xpra/client/gtk_base/gtk_client_window_base.py +++ b/src/xpra/client/gtk_base/gtk_client_window_base.py @@ -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): diff --git a/src/xpra/client/mixins/window_manager.py b/src/xpra/client/mixins/window_manager.py index 2ec0431496..447270799b 100644 --- a/src/xpra/client/mixins/window_manager.py +++ b/src/xpra/client/mixins/window_manager.py @@ -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()