-
-
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
fullscreen: rebuild & reconnect menu only on desktops with global menu #11350
Conversation
4e0961c
to
83595c7
Compare
For my understanding Qt::AA_DontUseNativeMenuBar is always false. This change has been introduced in Qt 5.7.1 (Ubuntu Bionic has 5.9): According to the comment we can check whether the menu bar is already non-native before chaining to full screen using MenuBar::isNativeMenuBar(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a Linux distro that has no native menu bar (DBus)?
If not we can just close this?
Oh, you got me there, I didn't investigat thoroughly. What I'm after is actually the unchangeable 'supports global menu' property, like
Is this okay in your opinion? |
83595c7
to
84264c6
Compare
src/mixxx.cpp
Outdated
#ifdef __LINUX__ | ||
inline bool supportsGlobalMenu() { | ||
QDBusConnection conn = QDBusConnection::sessionBus(); | ||
return conn.interface()->isServiceRegistered("com.canonical.AppMenu.Registrar"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Qt Implementation has also a null check.
https://github.com/qt/qtbase/blob/6e2963200642fa0171b247cb986726ca124795b0/src/gui/platform/unix/qgenericunixthemes.cpp#L108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For completeness you may also check the QT_NO_DBUS macro.
Yes. |
Yep, implemented as you suggested. Thanks for you help! |
84264c6
to
dcd0f69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thank you.
follow-up for #11328:
keep the menubar on all Linux desktops that don't use global menubars to avoid pointless operations.