Bug 404267

Summary: Global Menu does not respect Fitt's Law for switching menus when one is already open
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: Global MenuAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: kde, kde, mdmayfield, mvourlakos, plasma-bugs
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.21
Attachments: Video of the bug

Description Nate Graham 2019-02-12 21:47:02 UTC
Plasma 5.14.5, 5.15.0, and git master


STEPS TO REPRODUCE
1. Right-click on Desktop > Add Panel > Global Menu
2. Launch Dolphin
3. Jam the mouse all the way top the top edge of the screen and activate a menu item by clicking on it
4. Slide the menu to the right or left, keeping it on the topmost row of pixels

OBSERVED RESULT
Other menu items do not activate while the cursor is slid along the top row of pixels. You need to move the cursor down one pixel and then other menus will activate when the cursor passes over them.


EXPECTED RESULT
The topmost row of pixels should work for this. :)
Comment 1 Nate Graham 2019-02-12 21:49:42 UTC
Created attachment 118018 [details]
Video of the bug

Attaching a video of the bug.

Apparently it works in Latte Dock, per https://www.reddit.com/r/kde/comments/apewre/cant_hover_over_global_menus_to_open_them_when/
Comment 2 David Edmundson 2019-02-12 23:15:37 UTC
Panels do a funny thing with edges. 

Rather than relying on applets to provide their own margins the panel pads them and then relays the mouse events on the edge to the same position slightly inset.

It's a bit convoluted but I'm not sure why it would behave differently.
Comment 3 Kai Uwe Broulik 2019-02-13 08:12:21 UTC
The global menu applet uses an event filter on the open menu to allow moving between menu items even when a menu is open and thus grabs the mouse.

It works by figuring out which menu button is under the mouse right now and as such probably doesn't see a button where the "fake mouse event inside the border" margin happens.
Comment 4 Nate Graham 2019-02-13 15:58:43 UTC
(In reply to David Edmundson from comment #2)
> It's a bit convoluted but I'm not sure why it would behave differently.

For this particular widget's use case, there's great value in having those all-important edge pixels operate on the menu rather than get eaten by the panel. Adherence to Fitt's Law is one of the primary usability advantages of putting the menu bar on a screen edge rather than inside its window.
Comment 5 Kai Uwe Broulik 2019-02-13 16:00:15 UTC
I think David was more wondering why it doesn't work with the global menu plasmoid, when it works everywhere else. I explained above.
Comment 6 Michail Vourlakos 2019-02-13 16:37:16 UTC
(In reply to Kai Uwe Broulik from comment #5)
> I think David was more wondering why it doesn't work with the global menu
> plasmoid, when it works everywhere else. I explained above.

isnt a little strange that this issue does not appear with Latte panels?
Comment 7 Nate Graham 2020-07-02 00:30:44 UTC
*** Bug 423644 has been marked as a duplicate of this bug. ***
Comment 8 Matt Mayfield 2020-12-24 17:51:51 UTC
Hi everyone, and happy holidays.

I recently switched to Plasma and quickly encountered this bug. Once I get a dev environment for Plasma set up I will try to investigate.

One quick thought in the meantime, in case anyone has a moment to try it - is this PR to the System Tray applet at all applicable here?

https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/72

Is there any way a similar approach could be adapted for use in the Global Menu?

Thanks!

Matt
Comment 9 Nate Graham 2020-12-28 19:59:32 UTC
As far as I can tell, Global Menu is supposed to follow Fitts' Law, but a bug somewhere prevents it from working. The System tray issue was just poor design that didn't take it into account in the first place, which was fixed. So I'm afraid the fix is not applicable.
Comment 10 Bug Janitor Service 2021-01-14 20:42:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/573
Comment 11 Janet Blackquill 2021-01-14 21:28:57 UTC
Git commit da76df2937a67a51b96eaa1a0a56fda668ddb003 by Jan Blackquill.
Committed on 14/01/2021 at 20:42.
Pushed by cblack into branch 'master'.

[applets/appmenu]: Fill area.

This fixes a usability regression where the interaction region of the menu became too small after panel padding changes.

M  +1    -0    applets/appmenu/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/da76df2937a67a51b96eaa1a0a56fda668ddb003