diff options
| author | Sergey Katunin <[email protected]> | 2026-04-25 00:34:13 +0300 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-05-04 08:42:35 +0000 |
| commit | 02a754e91c47a690b7be37551cb09f353da238a1 (patch) | |
| tree | 8148c6ae3966af2e08c27f7042f49fcb367f036f /src/global.cpp | |
| parent | 968acf779b46d680c9afde4d70951cfcebfc6337 (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.
Diffstat (limited to 'src/global.cpp')
| -rw-r--r-- | src/global.cpp | 6 |
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())); + } } } } |
