From d2506ffa63812fd0d8e9de248d7f3dd94ec2bf38 Mon Sep 17 00:00:00 2001 From: Alexander Saoutkin Date: Sat, 22 Jun 2019 15:44:11 +0200 Subject: Open new instance of Dolphin if no URLs are given Summary: BUG: 408387 BUG: 408244 FIXED-IN: 19.08.0 Currently Dolphin only opens a new instance of itself in the following two scenarios: 1. No other Dolphin instances ( D21666 deals with not matching daemonized instances) are currently running. 2. A new instance is explicitly asked for via: `dolphin --new-window` A third scenario is needed to fix this bug: 3. If no URLs are passed in as arguments then open a new instance. This patch adds this third scenario. Test Plan: STEPS TO REPRODUCE 1. Open Dolphin 2. Right-click on Dolphin's Task Manager Entry and click "Start New Instance" 3. A new instance is created. As my system stuff is not built on master I am unable to replicate the bug (and can't confirm whether this fixes it), hence I'll rely on @ngraham to confirm whether this patch fixes the issue. Reviewers: ngraham, elvisangelaccio Reviewed By: ngraham, elvisangelaccio Subscribers: elvisangelaccio, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21691 --- src/global.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/global.cpp') 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 &urls, QWidget *window, const Open 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; } -- cgit v1.3