mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
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:
parent
383c890b0d
commit
2a9a6c5242
1 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue