-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better implementation of native menu bar on Linux #18593
Better implementation of native menu bar on Linux #18593
Conversation
@adazem009 |
Yes, that was the first thing I had done before I came up with this fix on the master branch. |
4d29ae4
to
622bd9e
Compare
@Eism I really think this is a Qt bug. I should test it with a newer Qt 5.15 release instead of doing weird workarounds. This crash was happening at the time of merging #15826, but I just didn't notice it. By the way, I think the menu bar needs a different implementation. What's the point of re-creating menu items every time when they're shown to the user (the |
Regarding using a newer Qt version, this might be helpful, from another PR that was also about a Qt bug: #17997 (comment) |
622bd9e
to
388e696
Compare
So, I've come up with a better implementation of the native menu bar and it fixes 2 issues. |
I don't know if this it actually relevant, but as long as you're looking at how menus are created on Linux, it sure would be nice if the new approach somehow managed to work on Wayland as per #15285 (see in particular the comment about global menus in #15285 (comment)) |
That issue is related to the non-native menu bar. I tried to launch MuseScore under Wayland but it doesn't start (see #18598). |
I'll defer this question to @RomanPudashkin and @Eism, since I'm not sure why this was done in the first place; but if it works without it, I can imagine that would be preferable because more efficient. |
I tried out the latest version on macOS and found some strange things: "About MuseScore" now opens the "About MusicXML" dialog, and the "Preferences" item calls the "revert-factory" action. This seems related to the |
I found another thing: directly after launching MuseScore, these affected items initially don't appear on macOS. If it turns out to be difficult to solve, we can decide to make two independent native menu bars, one for Mac and one for Linux. |
@cbjeukendrup This doesn't happen on Linux, but I think it's caused by how the menus are created. When you launch MuseScore, the |
I see. Then the best option is probably that I take a look at these issues myself :) |
baa4b85
to
5971188
Compare
@cbjeukendrup I've made the independent menu bars for Linux and macOS. |
@adazem009 Hi! Can you rebase please? |
I disabled loading subitems on Linux before because it caused MuseScore to crash on launch.
macOS will still use the old implementation The new implementation creates menu items when the app starts and reuses them to update their properties later.
5971188
to
bc54999
Compare
Done |
Thanks! I installed KDE plasma on my Ubuntu finally and able to reproduce crash from #18572 in master Tested #18572 on Ubuntu 22.04 with KDE Plasma 5.24.7 - FIXED Tested #16094 on Ubuntu 22.04 with KDE Plasma 5.24.7 - probably FIXED see #16094 (comment) |
Resolves: #18572
Resolves: #16094
This PR includes these fixes:
subitems
property changes (see the connections in theload()
function). The titles, checked, enabled, etc. properties are updated when a menu is about to show.Note: I didn't test this on macOS. The original menu bar implementation should be used there.