Bug 356018

Summary: Entries stay highlighted after closing context menu
Product: [Plasma] plasmashell Reporter: Kai Uwe Broulik <kde>
Component: Task Manager and Icons-Only Task ManagerAssignee: Eike Hein <hein>
Status: RESOLVED FIXED    
Severity: minor CC: bvbfan, plasma-bugs, umar
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kai Uwe Broulik 2015-11-28 10:03:17 UTC
When hovering a task entry or launcher it becomes highlighted. If I right click to open the context menu and then close the menu, the entry stays highlighted until I manualy hover it again.

QML probably doesn't get a mouse leave event because the context menu grabs everything.

Reproducible: Always
Comment 1 Eike Hein 2015-11-28 12:40:29 UTC
See also bug 353752

We have code to handle this (badly) in both the panel containment and in the Task Manager applet, but it's been known for some time it's not a good solution.
Comment 2 Eike Hein 2016-01-27 17:29:55 UTC
Git commit 9e0a7e991dbfc862a72f21f4662e280aff8ab317 by Eike Hein.
Committed on 27/01/2016 at 17:27.
Pushed by hein into branch 'Plasma/5.5'.

Fix entries staying highlighted after context menu closes.

MouseArea.containsMouse is set to true on press but never unset when
the item accepts hover events. This is unfortunate but documented
behavior so it can't be changed in Qt 5. If there's a leave before
the press, that means containsMouse ends up true even with the mouse
outside the item. So we unset the state ourselves.

M  +29   -2    applets/taskmanager/package/contents/ui/Task.qml
M  +14   -0    applets/taskmanager/plugin/backend.cpp
M  +3    -0    applets/taskmanager/plugin/backend.h

http://commits.kde.org/plasma-desktop/9e0a7e991dbfc862a72f21f4662e280aff8ab317
Comment 3 Eike Hein 2016-01-27 17:30:53 UTC
*** Bug 353752 has been marked as a duplicate of this bug. ***
Comment 4 S. Umar 2016-01-28 15:51:39 UTC
After building with this patch my systemtray digital clock etc. all  moved to left of the taskbar
with no way to fix it. Removing the patch fixes the problem.
Comment 5 Eike Hein 2016-01-28 15:59:22 UTC
If you were using the 5.5 branch there was a screwup where some diff markers got committed accidentally, please re-try.
Comment 6 S. Umar 2016-01-28 16:12:40 UTC
Nope....still the same and there is an error in the taskbar (looks like a window on the panel!)

Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:220:19: Type Task unavailable
file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:157:5: Cannot assign to non-existent property "onSmartLauncherEnabledChanged"
Comment 7 S. Umar 2016-01-28 16:46:42 UTC
It may be that the "Unity Launcher API..." was not committed to the 5.5 branch.
Comment 8 Eike Hein 2016-01-28 17:45:37 UTC
Should be fixed now.
Comment 9 S. Umar 2016-01-28 18:17:17 UTC
Yes. It is fine now. Thanks.
Comment 10 Eike Hein 2016-01-28 18:27:22 UTC
^ Thanks for your patience.