Bug 361917

Summary: KRunner window blocks Kate session selection window
Product: [Frameworks and Libraries] frameworks-kio Reporter: Eugene Shalygin <eugene.shalygin+bugzilla.kde>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: 4ernov, kde, kdelibs-bugs-null, kossebau, martin.steigerwald
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.7.0
Sentry Crash Report:
Attachments: Screenshot with half-blocked Kate window

Description Eugene Shalygin 2016-04-18 00:08:32 UTC
If Kate is launched via KRunner and shows the session selection dialog, KRunner does not understand that Kate is already launched and its window blocks the Kate's one.

Reproducible: Always

Steps to Reproduce:
1. In Kate settings select "Manually choose a session" in Sessions/Behaviour on Application Startup
2. close Kate
3. Press Alt+F2
4. type "kate"
5. select kate application and launch it

Actual Results:  
Session selection dialog is hidden behind KRunner window

Expected Results:  
Kate signals Krunner that it is launched and KRunner hides its window
Comment 1 Eugene Shalygin 2016-04-18 00:09:12 UTC
Created attachment 98439 [details]
Screenshot with half-blocked Kate window
Comment 2 Dominik Haumann 2016-04-18 19:28:39 UTC
Can reproduce, quite annoying.
Comment 3 Kai Uwe Broulik 2016-04-18 20:10:48 UTC
The services runner just does KRun::runService which seems to block if the application doesn't return.

Re-assigning to KIO. Suggestions? It looks like KRun ends up calling KToolInvocation::startServiceByDesktopPath which is deprecated but has a nowait parameter which I cannot use from KRun.

Irregardless of the behavior in the bug it's quite annoying that KRunner often blocks while the application is starting because of this behavior.
Comment 4 Kai Uwe Broulik 2016-04-21 19:31:46 UTC
*** Bug 359803 has been marked as a duplicate of this bug. ***
Comment 5 Kai Uwe Broulik 2016-04-21 19:37:06 UTC
*** Bug 353648 has been marked as a duplicate of this bug. ***
Comment 6 Kai Uwe Broulik 2016-04-21 19:38:50 UTC
*** Bug 358316 has been marked as a duplicate of this bug. ***
Comment 7 Kai Uwe Broulik 2016-06-06 17:52:48 UTC
Git commit 83eacf74ce6aba414a697747f3f2ac195e4e340b by Kai Uwe Broulik.
Committed on 06/06/2016 at 17:52.
Pushed by broulik into branch 'master'.

[Service Runner] Don't use KRun::runService

It blocks KRunner while the application is loading and in some cases
(like Kate's session selection dialog) might never return.
FIXED-IN: 5.7.0

Differential Revision: https://phabricator.kde.org/D1769

M  +1    -1    runners/services/servicerunner.cpp

http://commits.kde.org/plasma-workspace/83eacf74ce6aba414a697747f3f2ac195e4e340b