Bug 481686 - Continue to show menus for the previously-focused window when focus is lost to the panel or one of its widgets
Summary: Continue to show menus for the previously-focused window when focus is lost t...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu widget (show other bugs)
Version: master
Platform: Other Other
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-22 17:21 UTC by Emir SARI
Modified: 2025-01-19 10:35 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emir SARI 2024-02-22 17:21:02 UTC
Steps:
- Have application open with menus
- Click on a widget on the global menu (e.g. application launcher)

Expected:
- App menus continue to stay visible

Actual:
- App menus disappear, and Plasma Desktop gets focus
Comment 1 Nate Graham 2024-02-23 22:05:09 UTC
This is a hard problem. Only one thing can have focus at a time, and the Global Menu shows menus for the thing that does have focus. If we made the panel and its widgets never take focus, then you would be unable to interact with them using the keyboard--including typing search queries! Obviously that would not be acceptable.

The only approach I could see working is to have the Global Menu continue to show the menu of the last-focused window when the panel or one of its widgets takes focus--but only then, not when the desktop takes focus.
Comment 2 Doug 2024-02-24 06:28:59 UTC
(In reply to Nate Graham from comment #1)
> This is a hard problem. Only one thing can have focus at a time, and the
> Global Menu shows menus for the thing that does have focus. If we made the
> panel and its widgets never take focus, then you would be unable to interact
> with them using the keyboard--including typing search queries! Obviously
> that would not be acceptable.
> 
> The only approach I could see working is to have the Global Menu continue to
> show the menu of the last-focused window when the panel or one of its
> widgets takes focus--but only then, not when the desktop takes focus.

Could the Global Menu be populated with a "System" menu that links to various system functions like Settings or disk management, or Dolphin's menu (a la the way MacOS's uses Finder) whenever Plasma Desktop has focus?
Comment 3 Emir SARI 2024-02-24 07:02:44 UTC
(In reply to Doug from comment #2)
> Could the Global Menu be populated with a "System" menu that links to
> various system functions like Settings or disk management, or Dolphin's menu
> (a la the way MacOS's uses Finder) whenever Plasma Desktop has focus?

This is a good solution, but I think the active window would still lose focus whenever other widgets are clicked.

I think the approach here should be something similar to a dedicated Global Menu mode, where it is treated as a root Plasma object which has greater privileges rather than just being a widget. The user can switch to the previous "Taskbar Mode", where they can customise their panels as needed, but the Global Menu mode would change the paradigm totally (just like macOS does).