Fix for HMDTools targeting wrong screen on OSX

This commit is contained in:
Bradley Austin Davis 2015-05-06 10:32:45 -07:00
parent fa9dfbe073
commit de49057f17

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