From 02a754e91c47a690b7be37551cb09f353da238a1 Mon Sep 17 00:00:00 2001 From: Sergey Katunin Date: Sat, 25 Apr 2026 00:34:13 +0300 Subject: Dolphin::dolphinGuiInstances should skip daemon process This function should return a list without daemonized process, because it is a list of GUI instances. So, check whether the found DBus service can actually call requests for the path `/dolphin/Dolphin_1`, by calling `isActiveWindow()` method from this interface. --- src/global.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/global.cpp b/src/global.cpp index c91046efb..b32549102 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -162,7 +162,11 @@ QVector, QStringList>> Do QSharedPointer interface( new OrgKdeDolphinMainWindowInterface(service, QStringLiteral("/dolphin/Dolphin_1"), QDBusConnection::sessionBus())); if (interface->isValid() && !interface->lastError().isValid()) { - dolphinInterfaces.append(qMakePair(interface, QStringList())); + auto isActiveWindowReply = interface->isActiveWindow(); + isActiveWindowReply.waitForFinished(); + if (!isActiveWindowReply.isError()) { + dolphinInterfaces.append(qMakePair(interface, QStringList())); + } } } } -- cgit v1.3