Open star-buck opened 9 years ago
I just tried that and can confirm.
Any mouse event on the panel is lost when switching the menu. In fact any mouse event on the panel is eaten while the switch menu is open. This is different to other similar dialogs: systray and menu do not eat the event.
5 KMIX is a bad example: it's using a QMenu and a QMenu grabs the mouse. If a widget grabs the mouse it's expected that no other elements can receive mouse events. That's the basic contract of a context menu and absolutely the expected behavior.
well, in kde4.x you could have kmix open and still grab and move a window...just saying that this should be normal, expected behaviour.
by that I'm not saying that I think it should work like that from a user perspective. But technically it has to work like that. It's opening a (context) menu and if that doesn't grab the mouse it becomes problematic.
The new Plasmoid is not showing that interaction as it's no longer a QMenu.
The same is the case for other similar menus. E.g. the old Klipper would have prevented mouse interaction, while the new doesn't.
Just two notes:
a) The KMix popup is a QWidget, not a QMenu, and just from a casual glance I don't see it set a window type b) Clicking outside with the KMix popup open works fine here
concerning a) not much difference. It's grabbing the mouse, I just verified by:
There's not a single call to grabMouse() in the code tho and xwininfo works fine for me:
xwininfo: Please select the window about which you would like information by clicking the mouse in that window.
xwininfo: Window id: 0x380000f "kmix"
Absolute upper-left X: 1426 Absolute upper-left Y: 846 Relative upper-left X: 1426 Relative upper-left Y: 846 Width: 493 Height: 321 Depth: 32 Visual: 0xbe Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x380000e (not installed) Bit Gravity State: ForgetGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: yes Map State: IsViewable Override Redirect State: yes Corners: +1426+846 -1+846 -1-33 +1426-33 -geometry 493x321-1-33
--- snip ---
What's your kmix version? I have 4.6RC1 using KF5.5.
Eike, might it be that you are running the Qt with the broken mouse grabbing?
I'm on the 5.4 branch without the patch (unless it got in by now), sure.
I'm on the 5.4 branch without the patch (unless it got in by now), sure.
so you are able to click outside and get xwininfo due to a Qt bug :-P
can you test some more things: please try clicking on the task manager to close it. For me, the next event is not eaten in that case. If you can confirm that I have a theory to create a bug report against Qt.
confirmed
I am quite sure to have understood the root cause of the problem
I'm sure to be able to construct a minimal example to illustrate the problem to Qt devs, but I'm not sure how and where this could be fixed.
Reported as upstream bug https://bugreports.qt.io/browse/QTBUG-43776
I'm not sure is 100% correct (and if will be accepted) but a tentative Qt patch is here: https://codereview.qt-project.org/#/c/104061/
The package is libqt5gui5. Please note that the patch has regression potential.
still fails here even with updated packages from fixes ppa
The good news is that it does work fine here (Qt 5.4 branch git which should have Marco's patch, Plasma git master which probably doesn't matter), so it has to be possible to get it working in principle ...
in the case of MENU-SWITCH seems to be reproducible locally too (oddly, some times, doesn't happen 100% of the times). I'll look into it, seems to be some other kind of issue comared to the original popup dismissing one actually, all the events seems to be blocked for the whole panel until a click happens.. i wonder if is related to deleting the item that accepted the right mouse button press (the old applet that gets replaced) @eikehein: so does it work for you after the switch?
doesn't seem directly related to the switching, even just opening the alternatives menu eats a click. if you unblock it before performing the switch, then you switch and the first click will be ok. so the problem is in the chain context menu->alternatives menu
Here is my steps:
-> Menu opens.
interesting, wonder if is a different qt revision
this commit http://quickgit.kde.org/?p=plasma-workspace.git&a=commit&h=71b35c8b06220c1c31d29665c0559feb11055687 seem to fix the click issue with the alternatives dialog
maybe it didnt got shipped, but here the annoying "alt-switch" issue can still be seen in action: https://www.youtube.com/watch?v=Dh7A7L-3KcQ#t=168
the commit is in master and 5.2, locally i still indeed see the problem happen sometimes
so the bug is still not fixed, as it happens here all the time, not sometimes...
lets check again on fridays kci and prepare to fix this once more.
So, the problem seems is related but not the same fixed by the Qt patch. I pushed in plasma-framework a patch to this problem in particular and is in this commit: http://commits.kde.org/plasma-framework/1794d3c43f9a1b60b1fd24946a865ba43352f50e
so it needs either an updated plasma-framework package or the above patch to be included.