Bug 455520 - Focusing on a panel or open panel pop-up effectively dismisses window focus, and renders global menu empty and useless until panel is de-focused
Summary: Focusing on a panel or open panel pop-up effectively dismisses window focus, ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu (show other bugs)
Version: master
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: accessibility, usability
Depends on:
Blocks:
 
Reported: 2022-06-18 01:17 UTC by ratijas
Modified: 2022-09-11 01:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25.5 5.26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2022-06-18 01:17:14 UTC
SUMMARY

Global menu applet is useless with the new panel keyboard focus.


STEPS TO REPRODUCE
0. Add Global Menu applet onto a panel, restart some apps that have menus
2. Focus on a panel with Meta+Alt+P shortcut.

OBSERVED RESULT
As focus shift away from a window to a panel, global menu becomes empty.

EXPECTED RESULT
Global menu should still display the menu of an application that is in front, in other words, panel should not take away the focus from a window completely like it currently does.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.4
Kernel Version: 5.18.3-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: G752VT
System Version: 1.0
Comment 1 Nate Graham 2022-06-21 17:01:28 UTC
Only one thing can have focus at a time. If you focus a panel, then focus is taken away from your app. Since the Global Menu tracks focus, when you focus a panel, it will no longer show menu items for the app. Once you de-focus the panel, focus should return to the app and your Global Menu will once again show menu items for that app.

Other than this behavior being unexpected, what exactly is the problem you're experiencing?
Comment 2 ratijas 2022-06-21 20:10:37 UTC
Welp, OS X has managed to implement focus in such way that both Dock and top Menu / System tray could all be focused via keyboard, and I don't remember ever having problems with those.

In KDE/Plasma currently it is possible to set a shortcut on a Global Menu applet itself and thus directly invoke it (it's really a shame there's no shortcut by default, btw). But that limits you interactions with only one applet on a whole panel. Why limiting yourself, if with the new (and default!) shortcut it would be possible to use all the panel?
Comment 3 Nate Graham 2022-06-21 20:53:50 UTC
But what's the problem if focusing a panel removes focus from the previously-active app? What issue does it cause? What problem are you seeing? What capability have you lost?
Comment 4 ratijas 2022-06-21 21:00:44 UTC
> What problem are you seeing? What capability have you lost?
>
>> renders global menu empty and useless

I can't use the global menu with this shortcut. The whole applet, the whole menu is unusable, as it just disappears the moment you focus a panel via new shortcut.
Comment 5 Nate Graham 2022-06-21 21:04:40 UTC
But why is that a problem? When you have the panel focused, you're interacting with the panel. In order to use the global menu for an app, an app has to be focused.

Are you saying you want to:
1. Open an app
2. Move focus to a panel using the keyboard
3. While the panel is still keyboard-focused, use the cursor to interact with the global menu for the app from step 1
?
Comment 6 ratijas 2022-06-21 22:25:51 UTC
Yes, and I don't think it's totally unreasonable to expect :)
Comment 7 Nate Graham 2022-06-22 15:47:21 UTC
I have difficulty envisioning how we fix it with rewriting the world regarding how focus is handled (which is not worth the risk), but if you have an idea and want to give it a shot, feel free.

FWIW this was always the case even before we added explicit panel focus; when you open Kickoff, it always de-focused the active app and therefore changed the Global menu to show you Plasma's (nonexistent) menu structure.
Comment 9 Fushan Wen 2022-08-06 14:15:18 UTC
Git commit 6d544e5c7bf4bcb76af12bf8d3b193c6f3bae66b by Fushan Wen.
Committed on 06/08/2022 at 14:06.
Pushed by fusionfuture into branch 'master'.

applets/appmenu: do not update menu when panel gets focus

This makes the keyboard navigation work in the appmenu applet.
FIXED-IN: 5.25.4 5.26

M  +1    -0    applets/appmenu/lib/appmenuapplet.h
M  +1    -0    applets/appmenu/package/contents/ui/main.qml
M  +6    -0    applets/appmenu/plugin/appmenumodel.cpp
M  +5    -0    applets/appmenu/plugin/appmenumodel.h

https://invent.kde.org/plasma/plasma-workspace/commit/6d544e5c7bf4bcb76af12bf8d3b193c6f3bae66b
Comment 10 Fushan Wen 2022-08-06 14:47:18 UTC
Git commit 453403958014ae4cdd0fd24a1116f5808127fc59 by Fushan Wen.
Committed on 06/08/2022 at 14:47.
Pushed by fusionfuture into branch 'Plasma/5.25'.

applets/appmenu: do not update menu when panel gets focus

This makes the keyboard navigation work in the appmenu applet.
FIXED-IN: 5.25.4 5.26


(cherry picked from commit 6d544e5c7bf4bcb76af12bf8d3b193c6f3bae66b)

M  +1    -0    applets/appmenu/lib/appmenuapplet.h
M  +1    -0    applets/appmenu/package/contents/ui/main.qml
M  +6    -0    applets/appmenu/plugin/appmenumodel.cpp
M  +5    -0    applets/appmenu/plugin/appmenumodel.h

https://invent.kde.org/plasma/plasma-workspace/commit/453403958014ae4cdd0fd24a1116f5808127fc59