Skip to content

Commit 8b17b24

Browse files
committed
Linux global menu part 2
1 parent f92ac69 commit 8b17b24

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/app/GUI/mainwindow.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,6 @@ MainWindow::MainWindow(Document& document,
181181

182182
installEventFilter(this);
183183

184-
#ifdef LINUX_DEPLOY
185-
// ignore global menu state
186-
menuBar()->setHidden(false);
187-
#endif
188-
189184
setupLayout();
190185
readSettings(openProject);
191186
}
@@ -868,6 +863,11 @@ void MainWindow::readSettings(const QString &openProject)
868863
[this,
869864
openProject]() { openFile(openProject); });
870865
} else { openWelcomeDialog(); }
866+
867+
#ifdef LINUX_DEPLOY
868+
// ignore global menu state
869+
menuBar()->setHidden(false);
870+
#endif
871871
}
872872

873873
void MainWindow::writeSettings()

src/core/appsupport.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,9 @@ void AppSupport::initEnv(const bool &isRenderer)
10311031
if (registry.value("AppsUseLightTheme", 0).toInt() == 0) { qputenv("QT_QPA_PLATFORM", "windows:darkmode=1"); }
10321032
#endif
10331033
#elif defined(Q_OS_LINUX)
1034+
#ifdef LINUX_DEPLOY
1035+
qputenv("KDE_NO_GLOBAL_MENU", "1");
1036+
#endif
10341037
#ifndef FRICTION_EGL
10351038
qputenv("QT_QPA_PLATFORM", "xcb");
10361039
#endif

0 commit comments

Comments
 (0)