From fb2b1204db63210bcd9c347476ca2e5285adc30a Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Thu, 2 Apr 2015 10:16:52 -0700 Subject: [PATCH 1/2] Stop the menu from breaking on leaving HMD mode --- interface/src/ui/HMDToolsDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/ui/HMDToolsDialog.cpp b/interface/src/ui/HMDToolsDialog.cpp index 6c88bf9263..c5b8db06d0 100644 --- a/interface/src/ui/HMDToolsDialog.cpp +++ b/interface/src/ui/HMDToolsDialog.cpp @@ -184,8 +184,8 @@ void HMDToolsDialog::leaveHDMMode() { _switchModeButton->setText("Enter HMD Mode"); _debugDetails->setText(getDebugDetails()); - Application::getInstance()->setFullscreen(false); Application::getInstance()->setEnableVRMode(false); + Application::getInstance()->setFullscreen(false); Application::getInstance()->getWindow()->activateWindow(); if (_wasMoved) { From 8a757a4b6e530ec8de4e9abcd2e570c584426a27 Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Thu, 2 Apr 2015 10:27:11 -0700 Subject: [PATCH 2/2] Further work on menu handling on OSX in fullscreen / VR mode --- interface/src/Application.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 61b0499004..632db83415 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1585,6 +1585,10 @@ void Application::setFullscreen(bool fullscreen) { Menu::getInstance()->getActionForOption(MenuOption::Fullscreen)->setChecked(fullscreen); } +// The following code block is useful on platforms that can have a visible +// app menu in a fullscreen window. However the OSX mechanism hides the +// application menu for fullscreen apps, so the check is not required. +#ifndef Q_OS_MAC if (Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode)) { if (fullscreen) { // Menu hide() disables menu commands, and show() after hide() doesn't work with Rift VR display. @@ -1607,6 +1611,7 @@ void Application::setFullscreen(bool fullscreen) { _window->menuBar()->setMaximumHeight(QWIDGETSIZE_MAX); } } +#endif // Work around Qt bug that prevents floating menus being shown when in fullscreen mode. // https://bugreports.qt.io/browse/QTBUG-41883