mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Workaround Wayland popup menu bug.
When hiding a child popup first the app receives ApplicationDeactivate event and in a short time (a couple of ms) ApplicationActivate. But the first event hides all popups, so the parent popup gets closed too. Delay handling of ApplicationDeactivate event in this specific case.
This commit is contained in:
parent
196447ac19
commit
51027a0bc2
2 changed files with 12 additions and 2 deletions
|
@ -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 <QtCore/QLockFile>
|
||||
#include <QtGui/QSessionManager>
|
||||
|
@ -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<base::InvokeQueuedEvent*>(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);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d04a38e15d957ab0dacfe825396c199541097443
|
||||
Subproject commit 8db6dcf125da5c767d36a696794d4a51d82c7955
|
Loading…
Add table
Reference in a new issue