Avoid progress window pop-up when application not focused

A 10ms delay was chosen as it tends to result in the progress window
appearing immediately when clicking into the unfocused window, preventing
another action from being started before the progress window appears.

Closes #1873
This commit is contained in:
Damien Elmes 2022-05-26 12:34:50 +10:00
parent 383c890b0d
commit 2a9a6c5242

View file

@ -287,6 +287,11 @@ class ProgressManager:
return self._levels
def _on_show_timer(self) -> None:
if self.mw.app.focusWindow() is None:
# if no window is focused (eg app is minimized), defer display
self._show_timer.start(10)
return
self._show_timer = None
self._showWin()