diff --git a/plover/gui_qt/main_window.py b/plover/gui_qt/main_window.py index 8210d5d1a..ada0e36cf 100644 --- a/plover/gui_qt/main_window.py +++ b/plover/gui_qt/main_window.py @@ -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()