From bf464875f69e04e2bf0af70aea613f1a0600c231 Mon Sep 17 00:00:00 2001 From: Donald Carr Date: Wed, 27 Sep 2017 23:07:01 -0700 Subject: [PATCH] Restrict Unity workaround to Unity session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow explicit native menubar disabling as there are platforms with known broken implementations. Change-Id: Ice5fb1270969b422eb1a964fab5e305bc658c667 Reviewed-by: Orgad Shaneh Reviewed-by: André Hartmann Reviewed-by: Eike Ziller --- src/app/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index 7235796e3fd..fa6e93ef8ea 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -298,8 +298,10 @@ void loadFonts() int main(int argc, char **argv) { - if (Utils::HostOsInfo::isLinuxHost()) + if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR") + || qgetenv("XDG_CURRENT_DESKTOP").startsWith("Unity")) { QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar); + } Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX");