2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Add a checkbox to disable taskbar flash.

Also add ability to set urgent flag for the window on Linux.

Fixes #223, fixes #897, fixes #906.
This commit is contained in:
John Preston
2020-05-12 14:04:53 +04:00
parent f4f6550d66
commit 6f760d513e
15 changed files with 86 additions and 48 deletions

View File

@@ -27,6 +27,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "facades.h"
#include "app.h"
#include <QtGui/QWindow>
namespace Window {
namespace Notifications {
namespace {
@@ -290,7 +292,14 @@ void System::showNext() {
}
}
if (alert) {
Platform::Notifications::FlashBounce();
if (Global::FlashBounceNotify() && !Platform::Notifications::SkipFlashBounce()) {
if (const auto widget = App::wnd()) {
if (const auto window = widget->windowHandle()) {
window->alert(0);
// (window, SLOT(_q_clearAlert())); in the future.
}
}
}
if (Global::SoundNotify() && !Platform::Notifications::SkipAudio()) {
ensureSoundCreated();
_soundTrack->playOnce();