┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Katunin <[email protected]>2026-04-25 00:34:13 +0300
committerMéven Car <[email protected]>2026-05-04 08:42:35 +0000
commit02a754e91c47a690b7be37551cb09f353da238a1 (patch)
tree8148c6ae3966af2e08c27f7042f49fcb367f036f
parent968acf779b46d680c9afde4d70951cfcebfc6337 (diff)
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.
-rw-r--r--src/global.cpp6
1 files changed, 5 insertions, 1 deletions
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<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, QStringList>> Do
QSharedPointer<OrgKdeDolphinMainWindowInterface> 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()));
+ }
}
}
}