Skip to content

Commit

Permalink
gui_qt: fix possible crash on Linux
Browse files Browse the repository at this point in the history
If `_NET_ACTIVE_WINDOW` is not supported by the current window manager,
then we can't track the currently focused window and should therefore
not try to restore focus to it.
  • Loading branch information
benoit-pierre committed Mar 23, 2018
1 parent c4d2892 commit caab6fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plover/gui_qt/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _activate_dialog(self, name, args=(), manage_windows=False):
def on_finished():
del self._active_dialogs[name]
dialog.deleteLater()
if manage_windows:
if manage_windows and previous_window is not None:
wmctrl.SetForegroundWindow(previous_window)
dialog.finished.connect(on_finished)
dialog.show()
Expand Down

0 comments on commit caab6fb

Please sign in to comment.