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/global.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/global.cpp')
| -rw-r--r-- | src/global.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/global.cpp b/src/global.cpp index c9ec6a120..d5fbec6bc 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -15,6 +15,7 @@ #include <KDialogJobUiDelegate> #include <KIO/ApplicationLauncherJob> #include <KService> +#include <KWindowSystem> #include <QApplication> @@ -56,7 +57,7 @@ void Dolphin::openNewWindow(const QList<QUrl> &urls, QWidget *window, const Open job->start(); } -bool Dolphin::attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService) +bool Dolphin::attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService, const QString &activationToken) { bool attached = false; @@ -121,7 +122,7 @@ bool Dolphin::attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFi interface.first->openDirectories(interface.second, splitView); reply.waitForFinished(); if (!reply.isError()) { - interface.first->activateWindow(); + interface.first->activateWindow(activationToken); attached = true; } } |
