diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 6c332bbc1..d477101f4 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/qthelp_regex.h" #include "ui/ui_utility.h" #include "ui/effects/animations.h" +#include "ui/platform/ui_platform_utility.h" #include #include @@ -580,9 +581,18 @@ void Sandbox::registerEnterFromEventLoop() { } bool Sandbox::notifyOrInvoke(QObject *receiver, QEvent *e) { - if (e->type() == base::InvokeQueuedEvent::kType) { + const auto type = e->type(); + if (type == base::InvokeQueuedEvent::kType) { static_cast(e)->invoke(); return true; + } else if (receiver == this) { + if (type == QEvent::ApplicationDeactivate) { + if (Ui::Platform::SkipApplicationDeactivateEvent()) { + return true; + } + } else if (type == QEvent::ApplicationActivate) { + Ui::Platform::GotApplicationActivateEvent(); + } } return QApplication::notify(receiver, e); } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index d04a38e15..8db6dcf12 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit d04a38e15d957ab0dacfe825396c199541097443 +Subproject commit 8db6dcf125da5c767d36a696794d4a51d82c7955