X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/19cd2364a917c55e245dbdf3bfc87b2dc520046c..a509bd76291d330c69cb89284b2d99a3512a199e:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index 89720fb65..9da0c6fe8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include @@ -31,8 +32,6 @@ #include #include #include -#include -#include #include #include @@ -177,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; }