mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't wait for input when there are fullscreen applications
This commit is contained in:
parent
3991be752c
commit
13eeddf479
6 changed files with 22 additions and 1 deletions
|
@ -798,6 +798,10 @@ bool SkipFlashBounceForCustom() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WaitForInputForCustom() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool Supported() {
|
bool Supported() {
|
||||||
return ServiceRegistered || Gio::Application::get_default();
|
return ServiceRegistered || Gio::Application::get_default();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,10 @@ bool SkipFlashBounceForCustom() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WaitForInputForCustom() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool Supported() {
|
bool Supported() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,10 @@ bool SkipFlashBounceForCustom() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WaitForInputForCustom() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool Supported() {
|
bool Supported() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace Notifications {
|
||||||
[[nodiscard]] bool SkipAudioForCustom();
|
[[nodiscard]] bool SkipAudioForCustom();
|
||||||
[[nodiscard]] bool SkipToastForCustom();
|
[[nodiscard]] bool SkipToastForCustom();
|
||||||
[[nodiscard]] bool SkipFlashBounceForCustom();
|
[[nodiscard]] bool SkipFlashBounceForCustom();
|
||||||
|
[[nodiscard]] bool WaitForInputForCustom();
|
||||||
|
|
||||||
[[nodiscard]] bool Supported();
|
[[nodiscard]] bool Supported();
|
||||||
[[nodiscard]] bool Enforced();
|
[[nodiscard]] bool Enforced();
|
||||||
|
|
|
@ -369,6 +369,12 @@ bool SkipFlashBounceForCustom() {
|
||||||
return SkipToastForCustom();
|
return SkipToastForCustom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WaitForInputForCustom() {
|
||||||
|
QuerySystemNotificationSettings();
|
||||||
|
|
||||||
|
return UserNotificationState != QUNS_BUSY;
|
||||||
|
}
|
||||||
|
|
||||||
bool Supported() {
|
bool Supported() {
|
||||||
#ifndef __MINGW32__
|
#ifndef __MINGW32__
|
||||||
if (!Checked) {
|
if (!Checked) {
|
||||||
|
|
|
@ -729,7 +729,9 @@ bool Notification::checkLastInput(
|
||||||
std::optional<crl::time> lastInputTime) {
|
std::optional<crl::time> lastInputTime) {
|
||||||
if (!_waitingForInput) return true;
|
if (!_waitingForInput) return true;
|
||||||
|
|
||||||
const auto waitForUserInput = lastInputTime.has_value()
|
using namespace Platform::Notifications;
|
||||||
|
const auto waitForUserInput = WaitForInputForCustom()
|
||||||
|
&& lastInputTime.has_value()
|
||||||
&& (*lastInputTime <= _started);
|
&& (*lastInputTime <= _started);
|
||||||
|
|
||||||
if (!waitForUserInput) {
|
if (!waitForUserInput) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue