Bug 496919 - Global menu: Not working properly with our Qt app's dynamic menus
Summary: Global menu: Not working properly with our Qt app's dynamic menus
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu widget (show other bugs)
Version: 6.2.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-02 07:28 UTC by Tim E. Real
Modified: 2024-12-13 20:44 UTC (History)
3 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 Tim E. Real 2024-12-02 07:28:10 UTC
SUMMARY
Our Linux Qt app, the MusE Sequencer DAW, does not work properly with the global menu. 

STEPS TO REPRODUCE
Install MusE package or build, https://github.com/muse-sequencer/muse
Run MusE to see what's happening.

OBSERVED RESULT
Global menu is only partially populated, missing several menus.

EXPECTED RESULT
Global menu is fully populated with all menus.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Hello, according to https://community.kde.org/Plasma/Environment_Variables 
 under KDE_NO_GLOBAL_MENU, it says I should report misbehaving apps here. 
I hope you don't mind this Qt app.

MusE uses a sort of hybrid MDI and tabbed window system.
MDI to get a single shared menu bar, and tabbed windows to economize on space.
MusE uses dynamic menus. That is, the main window menu bar changes dynamically
 according which tabbed window is currently visible. Thus at different times the 
 main window menu bar is populated with different menus and items.

In other words, MusE is already doing what Global Menu wants to do - 
 one main window menu for all windows.
Thus I suspect they are kind of counteracting and fighting each other.

I have not delved deep into the issue, but I suspect that KDE Global Menu doesn't
 like our custom dynamic menu system, since the menu bar(s) keep changing.

Does this bug make sense, that is, Global Menu cannot support such dynamic menus?
Or is there something wrong with our app and Global Menu should be fine?

MusE works fine with the KDE_NO_GLOBAL_MENU environment variable set.
Maybe I could try setting the variable from within the app to make it a permanent 
 thing for users, instead of having to put it on the command line. 

Thanks for your consideration.
Comment 1 Tim E. Real 2024-12-13 20:44:42 UTC
Update: We learned about the Qt::AA_DontUseNativeMenuBar flag and have included in the app.
The app now works fine while such global menus are in use.
Although, this means it is unable to participate in these global menus, keeping its own menu system.