Bug 456440

Summary: Blue highlight disappears after right-click on icons hidden in the System Tray
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: System Tray widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: kde, materka, nate
Priority: NOR    
Version First Reported In: 6.3.3   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screen recording

Description Patrick Silva 2022-07-07 11:02:13 UTC
Created attachment 150460 [details]
screen recording

SUMMARY
Similar to bug 448526. On X11, the blue highlight disappears immediately after right-click on icons hidden in the system tray. On Wayland, the blue highlight disappears when I hover over an option from the context menu. Please watch the attached video recorded on X11.

EXPECTED RESULT
the blue highlight persists after right-click and mouseover on options from the context menu

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.4-051804-generic (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2022-07-13 18:17:00 UTC
Can reproduce.
Comment 2 Nate Graham 2022-07-14 03:42:14 UTC
We aren't overriding the default highlight code in HiddenItemsView.qml, which suggests that there may be a deeper issue inherent to QtQuick's ListView itself. I see that we *do* override the default highlight behavior in Kickoff, where the highlight effect remains visible when hovering over a context menu item.

If I'm right, we'll need to adopt similar code in the System Tray, or fix the highlight visibility issue in ListView itself.
Comment 3 David Redondo 2023-02-01 15:55:55 UTC
Could it be that the window loses focus due Menus doing that on X11?
Comment 4 David Redondo 2023-02-01 15:56:17 UTC
On the other hand doesn't happen in kickoff
Comment 5 Patrick Silva 2025-03-27 14:22:18 UTC
Editing the title because I can reproduce on Wayland too.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Graphics Platform: Wayland
Comment 6 Nate Graham 2025-04-11 21:06:46 UTC
So the problem appears to be related to the highlight and index semantics in Qt's GridView component.

Right now we're making use of its highlight: property, which causes the highlight effect to automatically follow the current index, which is changed by hover. But when you right-click, currentIndex gets reset to -1, so the highlight effect disappears.

Not sure if this is actually a bug or not, but it's certainly undesirable. Will try to find a way to avoid this without ripping out the bugs and rewriting the highlight code.
Comment 7 Nate Graham 2025-04-11 21:19:08 UTC
Can't figure it out. Giving up for now.

In the end I think we it would be nice if we ported all the messy delegate code for everything in Plasma to use ItemDelegates with their own highlight effects, and away from the pattern where the view handles the highlighting.