From de49057f17ad807141d965ae5282c964c4fa8135 Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Wed, 6 May 2015 10:32:45 -0700 Subject: [PATCH] Fix for HMDTools targeting wrong screen on OSX --- interface/src/ui/HMDToolsDialog.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/interface/src/ui/HMDToolsDialog.cpp b/interface/src/ui/HMDToolsDialog.cpp index 4a899a641e..343fc939b5 100644 --- a/interface/src/ui/HMDToolsDialog.cpp +++ b/interface/src/ui/HMDToolsDialog.cpp @@ -162,11 +162,16 @@ void HMDToolsDialog::enterHDMMode() { close(); } - Application::getInstance()->setFullscreen(true); Application::getInstance()->setEnableVRMode(true); const int SLIGHT_DELAY = 500; - QTimer::singleShot(SLIGHT_DELAY, this, SLOT(activateWindowAfterEnterMode())); + // If we go to fullscreen immediately, it ends up on the primary monitor, + // even though we've already moved the window. By adding this delay, the + // fullscreen target screen ends up correct. + QTimer::singleShot(SLIGHT_DELAY, this, [&]{ + Application::getInstance()->setFullscreen(true); + activateWindowAfterEnterMode(); + }); _inHDMMode = true; }