From 6c19e733673e24684707836fb2c9e0f45d1ac3f9 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 11 Oct 2022 21:21:09 +0200 Subject: 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 --- src/global.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/global.cpp') 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 #include #include +#include #include @@ -56,7 +57,7 @@ void Dolphin::openNewWindow(const QList &urls, QWidget *window, const Open job->start(); } -bool Dolphin::attachToExistingInstance(const QList& inputUrls, bool openFiles, bool splitView, const QString& preferredService) +bool Dolphin::attachToExistingInstance(const QList& inputUrls, bool openFiles, bool splitView, const QString& preferredService, const QString &activationToken) { bool attached = false; @@ -121,7 +122,7 @@ bool Dolphin::attachToExistingInstance(const QList& inputUrls, bool openFi interface.first->openDirectories(interface.second, splitView); reply.waitForFinished(); if (!reply.isError()) { - interface.first->activateWindow(); + interface.first->activateWindow(activationToken); attached = true; } } -- cgit v1.3