summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix/qgenericunixservices.cpp
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2023-09-04 06:26:16 +0400
committerIlya Fedin <fedin-ilja2010@ya.ru>2023-09-05 00:57:47 +0400
commitd524f0a75632d8603e32b3ee7fe02138ff8343d1 (patch)
tree2bd270c5274b32b9ee2562e99be27c463debee9f /src/gui/platform/unix/qgenericunixservices.cpp
parent9b40272562cb8f83efcd8a062c76edc41a9cf952 (diff)
QGenericUnixServices: ensure xdg activation token callback is called
The callback doesn't get called if the signal is emitted immediately or if hitting the early returns Fixes: QTBUG-113995 Pick-to: 6.6 6.5 Change-Id: Ib3e1d324a2becd8148cd76b4441fce5c4cc725e8 Reviewed-by: David Redondo <qt@david-redondo.de> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/gui/platform/unix/qgenericunixservices.cpp')
-rw-r--r--src/gui/platform/unix/qgenericunixservices.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/platform/unix/qgenericunixservices.cpp b/src/gui/platform/unix/qgenericunixservices.cpp
index 88968413563..3a289cda452 100644
--- a/src/gui/platform/unix/qgenericunixservices.cpp
+++ b/src/gui/platform/unix/qgenericunixservices.cpp
@@ -421,6 +421,7 @@ void runWithXdgActivationToken(F &&functionToCall)
QWindow *window = qGuiApp->focusWindow();
if (!window) {
+ functionToCall({});
return;
}
@@ -430,13 +431,14 @@ void runWithXdgActivationToken(F &&functionToCall)
dynamic_cast<QNativeInterface::Private::QWaylandWindow *>(window->handle());
if (!waylandWindow || !waylandApp) {
+ functionToCall({});
return;
}
- waylandWindow->requestXdgActivationToken(waylandApp->lastInputSerial());
QObject::connect(waylandWindow,
&QNativeInterface::Private::QWaylandWindow::xdgActivationTokenCreated,
waylandWindow, functionToCall, Qt::SingleShotConnection);
+ waylandWindow->requestXdgActivationToken(waylandApp->lastInputSerial());
}
bool QGenericUnixServices::openUrl(const QUrl &url)