Bug 422295

Summary: In-window menubars inappropriately disappear for windows on a screen without a Global Menu widget on it, if any other screens do have a Global Menu widget
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: jan.claussen10
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: mihailovb, nate
Priority: NOR Keywords: usability
Version First Reported In: 5.95.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description jan.claussen10 2020-05-31 14:36:47 UTC
SUMMARY
I am not sure where to put this. I have no panel on the second screen and global menu did not change the application's menu on that screen until recently. Now the menu of the application disappears and is also not visible, when in the global menu. It only reappears when I drag it onto the primary screen, where the panel (and the global menu) is located.

STEPS TO REPRODUCE
1. Install and configure the global menu applet
2. Connect a secondary screen
3. Drag an application onto the secondary screen

OBSERVED RESULT
The menu disappears completely

EXPECTED RESULT
The menu stays in the application, since there is no panel on the secondary screen

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.18.5
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Comment 1 Nate Graham 2022-06-27 19:37:42 UTC
Whether windows show an in-window menubar is global, not per-screen. There isn't a sane way to make it per-screen either, I'm afraid.
Comment 2 boriseto 2022-06-28 12:35:45 UTC
It filters by screen. Probably just needs a checkbox in its settings to set this on or off.
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/applets/appmenu/plugin/appmenumodel.cpp#L46

Answer from the author of it.
For now I'm using an applet that has the desired behavior.
Comment 3 Nate Graham 2022-06-28 12:52:00 UTC
I know that the Global Menu filters by screen (obviously, since you can move it around from one screen to another!), but kxmlgui does not. in kxmlgui whether to show the in-window menubar due to the presence of a global menu is a yes or a no; it can't know what screen the global menu is on because that would require knowledge of Plasma's internals and would make Plasma a dependency of kxmlgui.

Maybe there's a way to change that though I don't know how. If you're the author of some of this code, maybe you can help?