-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
crash when pressing menu hotkey (Alt+F) in fullscreen mode on Linux with a global menu #11320
Comments
Fix
TL;DRdon't hack arond xxx with Long storyBecause of #11294 Mixxx does recreate and reconnect the main menubar each time fullscreen is toggled on Linux, in case the desktop features a global menu, it's moved to the window so it's also available in fullscreen mode. |
Proposal #2Disable global menu (except on macOS, of course) with = menu always in window |
Proposal #4#3 + rework fullscreen toggle + toggle menu with Alt key (Linux and Windows only) This is the current state (WIP) of #11313 which I built on top of #11304 = menu always in window This is my favourite because it basically solves all fullscreen related issues on Linux. |
This commit gives some hints, not sure if it is useful: |
I cannot confirm that with Ubuntu Focal 20.4 Ubuntu And Unity desktop.
You have not mention:
|
Yes, as I wrote in the report, I tested 2.3.3 (HEAD) built on June 21 2022. Note that it works after I quit fullscreen (new global menu). 2.4 in the 22.04 VM also crashes. What shall I say, this happened in both VMs with freshly installed Ubuntu 20.04 / 22.04, packages updated and "just" ubuntu-unity-desktop installed. I can't tell if there are additional packages required, and a regular user doesn't know either and would blame Mixxx : Yes, #1 would only be an immediate fix to avoid the crash |
waaah, this is driving me crazy: so there is definitely something wrong... |
I dived into the qt source and it looks like as if the platform menu bar is first created and than deleted after setNativeMenuBar(false). Maybe there is a dangling pointer to the platform menu bar somewhere causing the crash. We can work around this by not using the probably evil setNativeMenuBar(false). This can be done by adjusting the Qt::AA_DontUseNativeMenuBar before createMenuBar() An alternative would be to set Unfortunately I can't verify this here, because it dies not crash. |
I tried setting Oh, and I forgot I'm already setting this in main.cpp in my fullscreen-rework which doesn't crash. |
Cool, that confirms my assumption that setNativeMenuBar(false) is evil. So how about trying my second proposal to use setNativeMenuBar(true) with |
must admit I don't have a clue what you're up to. edit Oh, you want to set and call that always (on Linux) when going fullscreen? I'll try that later on. |
With If I toggle I will stop experimenting with that, it's annoying. #11313 works beautifully for me, + there are no controls leaked anymore. Users who have a global menu will get used to it in Mixxx, like most got used to no global menu in firefox/thunderbird, and like these apps, Mixxx will likely be used maximized or in fullscreen so an in-window on-demand menubar will be acceptable IMHO. |
fixed / worked around with #11328 |
Bug Description
Affects Linux desktops with a global menu bar (Unity desktop, or xfce4 desktop + vala appmenu plugin)
Expected:
Actual result:
In initial windowed mode and after returning to that from fullscreen, hotkeys work as expeced.
When clicking a menu keyboard navigation works as expected.
Conclusion:
after
m_pMenuBar->setNativeMenuBar(false)
when going fullscreen, Qt can't handle the hotkeys anymore.backtrace.txt
Zulip 2.3.4 testing
Version
2.3.3 and newer
OS
Ubuntu 20.04.5 + 22.04 (both with Unity desktop), Ubuntu 20.04.5 with Xfce desktop and vala appmenu plugin
The text was updated successfully, but these errors were encountered: