Skip to content

Commit

Permalink
fullscreen: don't use native menubar in the first place
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Mar 2, 2023
1 parent e3bad53 commit 1a4d335
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ int main(int argc, char * argv[]) {
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif

#ifndef __APPLE__
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
#endif

// workaround for https://bugreports.qt.io/browse/QTBUG-84363
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) && QT_VERSION < QT_VERSION_CHECK(5, 15, 1)
qputenv("QV4_FORCE_INTERPRETER", QByteArrayLiteral("1"));
Expand Down
8 changes: 4 additions & 4 deletions src/mixxxmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,10 +1144,10 @@ bool MixxxMainWindow::eventFilter(QObject* obj, QEvent* event) {
} else {
qWarning() << " $ WindowStateChange: leave fullscreen";
}
#ifdef __LINUX__
createMenuBar();
connectMenuBar();
#endif
//#ifdef __LINUX__
// createMenuBar();
// connectMenuBar();
//#endif
qWarning() << " > emit fullScreenChanged(" << isFullScreen() << ")";
qWarning() << " .";

Expand Down
10 changes: 5 additions & 5 deletions src/widget/wmainmenubar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,11 @@ void WMainMenuBar::onFullScreenStateChange(bool fullscreen) {
#ifdef __LINUX__
// Menu bar has been recreated and reconnected, which is a requirement
// to setNativeMenuBar() without issues (reported on Ubuntu with Unity desktop)
if (isNativeMenuBar()) {
qWarning() << " > is native, move to window";
// move the menu bar to the window
setNativeMenuBar(false);
}
// if (isNativeMenuBar()) {
// qWarning() << " > is native, move to window";
// // move the menu bar to the window
// setNativeMenuBar(false);
// }
#endif

#ifndef __APPLE__
Expand Down

0 comments on commit 1a4d335

Please sign in to comment.