Bug 420418 - Global menu disappesrs when application moved to second monitor
Summary: Global menu disappesrs when application moved to second monitor
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu widget (show other bugs)
Version: 5.22.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-22 11:24 UTC by prasad
Modified: 2024-09-08 20:52 UTC (History)
6 users (show)

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


Attachments
mp4 demonstrating the issue (2.40 MB, video/mp4)
2021-01-06 01:07 UTC, silocoder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description prasad 2020-04-22 11:24:36 UTC
SUMMARY
Global menu disappears when an application moved to second monitor, though application still have focus and active.
I use Kde neon 5.18.4. I have global menu. when I move an active application, the global menu disappears from panel, though application is still active and i am using the application.

STEPS TO REPRODUCE
1. place global menu widget in panel (in my case, I have top panel)
2. open any application on primary screen (application menu is visible in panel)
3. move the application to second monitor and keep it active and keep using

OBSERVED RESULT
The application's menu disappears from panel.

EXPECTED RESULT
The application menu shall be visible.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kde neon 5.18
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 prasad 2020-04-22 11:46:04 UTC
The issue also happens if any application on second monitor becomes active. 
when an application on second monitor gets clicked and becomes active, global menu in panel disappears.
Comment 2 silocoder 2021-01-06 01:07:54 UTC
Created attachment 134601 [details]
mp4 demonstrating the issue

Any workarounds?

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Kernel Version: 5.8.0-33-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4810MQ CPU @ 2.80GHz
Memory: 15.6 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 3 silocoder 2021-01-06 01:39:01 UTC
I have what I believe is a good workaround. Just add a 2nd Panel to the 2nd monitor with the Global Menu widget and any other widgets desired. This way the application's menu in the 2nd monitor will show.
Comment 4 Rober 2021-08-29 09:26:16 UTC
Same bug in 
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.13-arch1-1 (64-bit)
Graphics Platform: X11
Graphics Processor: Mesa Intel® HD Graphics 620
Comment 5 ratijas 2022-09-22 22:46:32 UTC
This is kind of a feature rather than a bug. Global Menu applet filters windows (technically, tasks) by screen, so it only "sees" what's on its own screen.

I also found myself sometimes being annoyed by this behavior.  I guess we could make it configurable instead.
Comment 6 Dimo Fedortchenko 2022-09-23 11:18:24 UTC
I can understand the dilemma, but technically only 1 application can ever be active at one time, even with multiple displays,  and global menu is supposed to display the active application, so shouldn't that mean that it respects any running application even if it's on another screen?

If you look at how for example Apple does it in macos, which is what I suspect Global Menu is an attempt at replicating, the top menu bar (and it's "global menu") in macos always shows the menu for the active application no matter what screen it's on.

As for the workaround, forcing the creation of additional panels on secondary screens is not a good solution because it means you have to spend time setting up your secondary monitors, adds complexity to a setup, and can cause other unintended side effects.
If you happen to unplug an external monitor with a global menu panel on it, the panel and thus the global menu still lives somewhere in the void and you can then never remove that widget without hacking the KDE configuration!
If you replug the same monitor you will in most cases see the panel again, but if kde does not recognise the monitor for some reason or if your monitor breaks, you're screwed - i had this issue before where I lost panels with global menu widgets on them in the void and had to hack the config files.

So my suggestion would be to just emulate the macos solution, since I guess that's the basis for global menu anyway.