Bug 414804

Summary: Krunner does not reliably find windows
Product: [Plasma] krunner Reporter: leftcrane <leftcrane>
Component: windowsAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: major CC: bugseforuns, luke-jr+kdebugs, meven29, mojolo
Priority: NOR    
Version: 5.17.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.18
Sentry Crash Report:

Description leftcrane 2019-12-03 19:32:00 UTC
SUMMARY

Krunner is unable to locate windows half of the time. For example, there is no way to find the Konsole Window by typing "Konsole" or "Terminal". If you type "Discover" it won't open Discover - you have to type in the exact Window name from the beginning - eg "Featur ..." if the name is "Featured -- Discover" (and sometimes that won't work either).

All this is made worse by the fact that the results of the search do not appear in an application-centric order, so when you type in the name of the window you're more likely to open an new instance of the app (or not, for certain KDE apps) or some file instead of the open window.

The long and short of is that it isn't possible to search for open windows with Krunner.


Operating System: Kubuntu 19.10
KDE Plasma Version: 5.17.3
KDE Frameworks Version: 5.64.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-24-generic
OS Type: 64-bit
Comment 1 mojo_lo 2020-01-03 06:25:43 UTC
Same issue. Windows rarely ever show up in krunner search results.

- For example, typing "firefox" (with a Firefox window open) has yielded a 'Windows' result once, but never again.
- Typing in "kate" (with a Kate window open) produces no 'Windows' results.
- If Kate's window title is "Untitled -- Kate", krunner shows a 'Windows' result for a split second when I start typing "Unti". When I type the next "t", the result disappears and I can never get it to show up again.

Operating System: Kubuntu 19.10
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-24-generic
OS Type: 64-bit
Comment 2 andyhoang 2020-01-03 15:29:24 UTC
Same issues, problem on at least those version

krunner-5.63.0-1-x86_64.pkg.tar.xz
krunner-5.64.0-1-x86_64.pkg.tar.xz
krunner-5.65.0-2-x86_64.pkg.tar.xz


I fall back to 
krunner-5.60.0-1-x86_64.pkg.tar.xz

which is running fine

Operating System: Arch Linux 
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.65.0
Qt Version: 5.14.0
Kernel Version: 5.4.7-arch1-1
OS Type: 64-bit
Comment 3 Méven Car 2020-01-22 18:00:45 UTC
Git commit 6a6b94ba7377cfc8262f31935c4158dde4c84661 by Méven Car.
Committed on 22/01/2020 at 18:00.
Pushed by meven into branch 'Plasma/5.18'.

Runner/Windows make the window finding more reliable

Summary:
QTimer::singleShot could dispatch gatherInfo after the next WindowsRunner::match was called in a not-ready state preventing to return match.

prepareForMatchSession will lock the lock, allowing only gatherInfo to run, which will unlock the lock, allowing match() to run.
FIXED-IN: 5.18

Reviewers: #plasma, ngraham, mart, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

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

M  +6    -10   runners/windows/windowsrunner.cpp
M  +0    -1    runners/windows/windowsrunner.h

https://commits.kde.org/plasma-workspace/6a6b94ba7377cfc8262f31935c4158dde4c84661