┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 017a31f1d..9da0c6fe8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -23,6 +23,7 @@
#include <KLocalizedString>
#include <KConfigGui>
#include <KIO/PreviewJob>
+#include <KWindowSystem>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
@@ -175,7 +176,14 @@ int main(int argc, char **argv)
}
if (!parser.isSet(QStringLiteral("new-window"))) {
- if (Dolphin::attachToExistingInstance(urls, openFiles, splitView)) {
+
+ QString token;
+ if (KWindowSystem::isPlatformWayland()) {
+ token = qEnvironmentVariable("XDG_ACTIVATION_TOKEN");
+ qunsetenv("XDG_ACTIVATION_TOKEN");
+ }
+
+ if (Dolphin::attachToExistingInstance(urls, openFiles, splitView, QString(), token)) {
// Successfully attached to existing instance of Dolphin
return 0;
}