┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/global.cpp4
-rw-r--r--src/main.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/global.cpp b/src/global.cpp
index 73e154b3a..42044c97d 100644
--- a/src/global.cpp
+++ b/src/global.cpp
@@ -72,8 +72,8 @@ void Dolphin::openNewWindow(const QList<QUrl> &urls, QWidget *window, const Open
bool Dolphin::attachToExistingInstance(const QList<QUrl>& 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
index 639dc32ef..10adfc638 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -142,11 +142,6 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
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 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
}
}
+ if (urls.isEmpty()) {
+ // We need at least one URL to open Dolphin
+ urls.append(Dolphin::homeUrl());
+ }
+
DolphinMainWindow* mainWindow = new DolphinMainWindow();
if (openFiles) {