Merge pull request #4779 from jherico/hmd_tools

Fix for HMDTools targeting wrong screen on OSX
This commit is contained in:
Brad Hefta-Gaub 2015-05-06 10:46:55 -07:00
commit b27154186b

View file

@ -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;
}