diff --git a/src/global.cpp b/src/global.cpp --- a/src/global.cpp +++ b/src/global.cpp @@ -72,8 +72,8 @@ bool Dolphin::attachToExistingInstance(const QList& inputUrls, bool openFiles, bool splitView, const QString& preferredService) { - if (KWindowSystem::isPlatformWayland()) { - // TODO: once Wayland clients can raise or activate themselves remove this conditional + // TODO: once Wayland clients can raise or activate themselves remove check from conditional + if (KWindowSystem::isPlatformWayland() || inputUrls.isEmpty()) { return false; } diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -142,11 +142,6 @@ return app.exec(); } - if (urls.isEmpty()) { - // We need at least one URL to open Dolphin - urls.append(Dolphin::homeUrl()); - } - if (splitView && urls.size() < 2) { // Split view does only make sense if we have at least 2 URLs urls.append(urls.last()); @@ -159,6 +154,11 @@ } } + if (urls.isEmpty()) { + // We need at least one URL to open Dolphin + urls.append(Dolphin::homeUrl()); + } + DolphinMainWindow* mainWindow = new DolphinMainWindow(); if (openFiles) {