Bug 456231 - Previous mouse selection active when kickoff launched and navigated using keyboard
Summary: Previous mouse selection active when kickoff launched and navigated using key...
Status: RESOLVED DUPLICATE of bug 455674
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
Depends on:
Reported: 2022-07-02 08:02 UTC by Abhijeet Viswa
Modified: 2022-07-05 16:38 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:

Steps to reproduce/demo of bug (2.97 MB, video/x-matroska)
2022-07-02 08:02 UTC, Abhijeet Viswa

Note You need to log in before you can comment on or make changes to this bug.
Description Abhijeet Viswa 2022-07-02 08:02:27 UTC
Created attachment 150335 [details]
Steps to reproduce/demo of bug

When you use the mouse to select an item from the search list view and then the plasmoid is relaunched, as long as the mouse never lands on top of the plasmoid, the previous search list element will be highlighted.

This is not strictly restricted to search. It is reproducible in any list/grid view of Kickoff.

1. Search for something
2. Use mouse to click and open an item from the list
3. Once plasmoid closes, move mouse away to different part of screen
4. Reopen plasmoid once again (using mouse, keyboard shortcut etc).. Ensure mouse is never on top of plasmoid full representation
5. Search for something using keyboard
6. If it's the same search term, the previously clicked on item will be activated/highlighted\

(Check Video attachment, each time I type in 'f' into the search field, the previous selection becomes highlighted after a half a second or so)

Linux/KDE Plasma: 5.18 Linux Zen, KDE master branch (compiled from source)
(available in About System) 
Qt Version: 5.15.5+kde+r166-1 and 6.3.1-1 (from the Arch repos, not sure which one KDE uses)

I tried debugging this and finally realized it had to do with how the `onEntered` handler is triggered in `KickoffItemDelegate`'s `MouseArea`. If you dig deep enough, you'll realize that the `containsMouse` property is `true`. Further items in other lists can also be active (for example, favorites grid/list view or applications list view).

Essentially, the mouse pointer position doesn't get updated and remains at the previous value (when we made the first mouse click in Step 2) even after relaunching the plasmoid. My QML experience is limited and I don't know how to fix this. 

If anyone has any insights on how to fix it, I can provide a patch. 
Also, this is a possible 15-Minute bug.
Comment 1 Nate Graham 2022-07-05 16:38:55 UTC

*** This bug has been marked as a duplicate of bug 455674 ***