From 9ff427afad938cd9fc6db93ae817434c3817861b Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 15 May 2020 01:10:27 +0300 Subject: [PATCH] Fixed indefinitely bouncing of dock icon. --- Telegram/SourceFiles/window/notifications_manager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index 2d297637b..faa15f9b9 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -37,6 +37,12 @@ namespace { constexpr auto kMinimalAlertDelay = crl::time(500); constexpr auto kWaitingForAllGroupedDelay = crl::time(1000); +#ifdef Q_OS_MAC +constexpr auto kSystemAlertDuration = crl::time(1000); +#elif // !Q_OS_MAC +constexpr auto kSystemAlertDuration = crl::time(0); +#endif // Q_OS_MAC + } // namespace System::System(not_null session) @@ -295,7 +301,7 @@ void System::showNext() { if (Global::FlashBounceNotify() && !Platform::Notifications::SkipFlashBounce()) { if (const auto widget = App::wnd()) { if (const auto window = widget->windowHandle()) { - window->alert(0); + window->alert(kSystemAlertDuration); // (window, SLOT(_q_clearAlert())); in the future. } }