diff options
| author | Nicolas Fella <[email protected]> | 2022-10-11 21:21:09 +0200 |
|---|---|---|
| committer | Nicolas Fella <[email protected]> | 2022-10-14 14:46:29 +0000 |
| commit | 6c19e733673e24684707836fb2c9e0f45d1ac3f9 (patch) | |
| tree | f95d905c3e17a2d5e3acb55b9312d925506b77e2 /src/dbusinterface.cpp | |
| parent | 354aba3c85c686bee8027e3ff84d1684c9a6c840 (diff) | |
Fix Wayland window activation when attaching to an existing instance
The application launching Dolphin passes a token via the XDG_ACTIVATION_TOKEN environment variable
We need to pass that to the running instance so that it can use it to raise itself
Diffstat (limited to 'src/dbusinterface.cpp')
| -rw-r--r-- | src/dbusinterface.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dbusinterface.cpp b/src/dbusinterface.cpp index 0d43dfc23..8d5bf7645 100644 --- a/src/dbusinterface.cpp +++ b/src/dbusinterface.cpp @@ -31,9 +31,8 @@ void DBusInterface::ShowFolders(const QStringList& uriList, const QString& start if (urls.isEmpty()) { return; } - KWindowSystem::setCurrentXdgActivationToken(startUpId); const auto serviceName = isDaemon() ? QString() : QStringLiteral("org.kde.dolphin-%1").arg(QCoreApplication::applicationPid()); - if(!Dolphin::attachToExistingInstance(urls, false, GeneralSettings::splitView(), serviceName)) { + if(!Dolphin::attachToExistingInstance(urls, false, GeneralSettings::splitView(), serviceName, startUpId)) { Dolphin::openNewWindow(urls); } } @@ -44,9 +43,8 @@ void DBusInterface::ShowItems(const QStringList& uriList, const QString& startUp if (urls.isEmpty()) { return; } - KWindowSystem::setCurrentXdgActivationToken(startUpId); const auto serviceName = isDaemon() ? QString() : QStringLiteral("org.kde.dolphin-%1").arg(QCoreApplication::applicationPid()); - if(!Dolphin::attachToExistingInstance(urls, true, GeneralSettings::splitView(), serviceName)) { + if(!Dolphin::attachToExistingInstance(urls, true, GeneralSettings::splitView(), serviceName, startUpId)) { Dolphin::openNewWindow(urls, nullptr, Dolphin::OpenNewWindowFlag::Select); }; } |
