Bug 354651

Summary: Perform click action to item cause highlight other
Product: [Plasma] plasmashell Reporter: Anthony Fieroni <bvbfan>
Component: System MonitorAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: bryan.sutherland, demm, eseifert, kde, luca86
Priority: NOR    
Version: 5.4.2   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
URL: http://tinypic.com/player.php?v=300crbm%3E&s=9
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Anthony Fieroni 2015-10-31 19:39:29 UTC
Click on item in systray item random highlight on other.

Reproducible: Always

Steps to Reproduce:
1. Left click on item in system tray
2. Expand view is opened
3. Perform right or left mouse move, do not perform click
4. Move mouse out from systray, last pointed item stays highlighted

Actual Results:  
When mouse pointer goes out of systray last pointed item stays highlighted.

Expected Results:  
When mouse goes away last pointed item must NOT be highlighted.

Same issue as https://bugs.kde.org/show_bug.cgi?id=353752
This concerns for whole panel and whatever have pointed items. I don't know it's QtQuick issue, but it's ridiculous.
Comment 1 Anthony Fieroni 2015-11-15 06:17:38 UTC
Any progress here? This bug is not a big deal, but it's irritant. Did you want any help?
Comment 2 David Edmundson 2015-11-15 12:34:39 UTC
Can't reproduce. Can you attach a video please
Comment 3 Anthony Fieroni 2015-11-16 04:39:44 UTC
Video is attched look above and it happen on click in system tray, like akregator has news to read ckick on it move away and last pointed on systray stay highlighted. It happens all over panel.
http://tinypic.com/player.php?v=300crbm%3E&s=9
Comment 4 Anthony Fieroni 2015-11-16 04:54:30 UTC
Mone more http://tinypic.com/player.php?v=110ho4z%3E&s=9 last click is affected, when click and move away information tip stays because item (clipboard) is highlighted.
As you can see http://tinypic.com/player.php?v=33jjsls%3E&s=9 when click menu and move away dolphin icon stays highlighted till i return to panel. It'a big focus bug all over Qt5 - i think
Comment 5 Anthony Fieroni 2015-11-16 05:15:01 UTC
One more http://tinypic.com/player.php?v=2z9lkk0%3E&s=9 right click take action move away cursor, item that was actioned stays highlighted till i return cursor to him (dolphin)
Comment 6 Anthony Fieroni 2015-11-21 03:10:04 UTC
plasma 5.4.95 still present. As see videos can you reproduce it now?
Comment 7 Anthony Fieroni 2015-11-26 06:01:47 UTC
Add revew request with working patch
https://git.reviewboard.kde.org/r/126175/
Comment 8 David Edmundson 2015-11-26 21:00:14 UTC
Seems like you're right about the cause

So that bit of code solves the following problem:
 - applets aren't flush to the edge of the screen, in order to have a visual margin the applets have some padding
 - clicking on the edge of the screen are easiest to hit with the mouse and we want clicking on their to activate the applet
 
The code you've linked to found copies mouse events in the panel into the relevant applet.

Now it seems that's not very good as we send a mouse press event into some applet/button, but that doesn't get a mouse-leave, as the mouse was never in there to begin with.

Either we track that inside the panel (there's similar code in dialog) and proxy mouseleaves (which will have to be very clever) or we find another solution to the above problem.
Comment 9 David Edmundson 2015-11-26 22:58:44 UTC
/maybe/ if we just add MouseEnter and MouseLeave to the swtich statement it'd just work?

 might mean the containment gets a double and and leave. Worth a shot?
Comment 10 Anthony Fieroni 2015-11-27 03:43:23 UTC
revision 31b0bf7f "Prevent possible endless recursion in PanelView event handling"
sendEvent is replaced with postEvent. If you mean to add QEvent::Leave to switch statement it's not work.
Comment 11 Anthony Fieroni 2015-11-27 04:04:59 UTC
Maybe it better to not post MouseMove, ony click action, what you think?
Comment 12 David Edmundson 2015-12-01 14:31:39 UTC
Git commit 76cb47f1279ea012a9eda11c4ead7f28db4c1399 by David Edmundson, on behalf of Anthony Fieroni.
Committed on 01/12/2015 at 14:31.
Pushed by davidedmundson into branch 'Plasma/5.5'.

Forward mouse enter and leave events on feathered edges

REVIEW: 126175

M  +20   -2    shell/panelview.cpp

http://commits.kde.org/plasma-workspace/76cb47f1279ea012a9eda11c4ead7f28db4c1399
Comment 13 demm 2015-12-04 20:31:59 UTC
This fix/patch causes mouse clicks to fail 2 out of 3 times on clicking any icon on the panel.  Plasma-workspace 5.5.0 build from tars available to packagers yesterday.
Reverting the patch, all left click mouse actions work again on first click.
Comment 14 Anthony Fieroni 2015-12-08 03:54:01 UTC
The patch is correct! The problem is on X, on Wayland works as expected, but Wayland is still a preview. I wrote in review request https://git.reviewboard.kde.org/r/126175/ after MouseButtonPress Leave is triggered only on X, this is a huge bug on K Windowed system/KWin or Qt on xcb - i don't know, Marting Graesslin knows better.
Comment 15 Anthony Fieroni 2015-12-13 12:37:18 UTC
I reopen, cause patch has a regression on Xcb, on Wayland works as expected. I made new review request https://git.reviewboard.kde.org/r/126331/ it's need more tests here, we don't want any regression.
Comment 16 David Edmundson 2015-12-15 12:50:22 UTC
Git commit 1390b40b399770e7a67da714c74d172eee1bb433 by David Edmundson, on behalf of Anthony Fieroni.
Committed on 15/12/2015 at 12:50.
Pushed by davidedmundson into branch 'Plasma/5.5'.

Fix left click on item in panel being ignored

Last patch has a reggression due to QtQuick issue (only on Xcb):
QEvent::Leave is triggered after QEvent::MouseButtonPress Qt::LeftButton
REVIEW: 126331

M  +9    -16   shell/panelview.cpp

http://commits.kde.org/plasma-workspace/1390b40b399770e7a67da714c74d172eee1bb433