mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05: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
da9e3c97ff
commit
5039db0e17
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