diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-22 08:55:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-22 08:55:44 +0200 |
commit | c547c84b9081a3f504c3b744944f704505af1c34 (patch) | |
tree | e720417a5d5fd99d9572c2bb9eccb22cef41e16a /compat | |
parent | b253d56527365a729c0249918f6c9477893a717e (diff) |
compat/check-visible: use short timeout when frozen
Diffstat (limited to 'compat')
-rw-r--r-- | compat/check-visible.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compat/check-visible.cpp b/compat/check-visible.cpp index 386bbb1f..d1d928fd 100644 --- a/compat/check-visible.cpp +++ b/compat/check-visible.cpp @@ -9,6 +9,7 @@ #include <windows.h> static constexpr int visible_timeout = 5000; +static constexpr int invisible_timeout = 250; static Timer timer; static QMutex mtx; @@ -19,7 +20,7 @@ void set_is_visible(const QWidget& w, bool force) { QMutexLocker l(&mtx); - if (!force && timer.elapsed_ms() < visible_timeout) + if (!force && timer.elapsed_ms() < (visible ? visible_timeout : invisible_timeout)) return; timer.start(); |