Bug 407517 - no current item set if mouse is already above one
Summary: no current item set if mouse is already above one
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-14 10:01 UTC by Harald Sitter
Modified: 2019-06-11 14:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2019-05-14 10:01:06 UTC
If I am reading the current code right then the current item of the listview is only changed once the mouse area got onPositionChanged and mapped to an actual item.
This leads to items not being right clickable when the mouse is already positioned above it.


STEPS TO REPRODUCE
1. hit meta to open kickoff
2. position mouse above an entry
3. hit esc to close kickoff
4. hit meta to open kickoff
5. right click without moving the mouse

OBSERVED RESULT
Nothing happens.

> file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/KickoffListView.qml:128: TypeError: Cannot call method 'openActionMenu' of null


EXPECTED RESULT

The item under the mouse cursor should get its context menu shown.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.15
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Supposedly running the current item calculation on Component.onCompleted to determine if the mouse is already above an item would be sufficient to solve this problem.
Comment 1 Harald Sitter 2019-05-14 10:30:58 UTC
I am also not quite sure why onPressed maps an item for left clicking but for right clicking it maps a (potentially?) different item and then invokes listView.currentItem. It seems to me both button types should use the local `item`?
Comment 2 Nate Graham 2019-06-11 14:22:02 UTC
This was a deliberate change; see https://cgit.kde.org/plasma-desktop.git/commit/?id=48b32259e73f374a456ed836ba44e3effe2baee5. We got bug reports on the old behavior (Bug 397693).