Use real full-screen on macOS when capturing keys

This commit is contained in:
Cameron Gutman 2021-01-12 19:57:01 -06:00
parent c331b180cb
commit 8e790c4745

View File

@ -531,6 +531,15 @@ bool Session::initialize()
break;
}
#ifdef Q_OS_DARWIN
// macOS behaves as if we're capturing system keys when
// we enter "real" full-screen mode, so use standard
// full-screen as our full-screen flag when capturing keys.
if (m_Preferences->captureSysKeys) {
m_FullScreenFlag = SDL_WINDOW_FULLSCREEN;
}
#endif
#if !SDL_VERSION_ATLEAST(2, 0, 11)
// HACK: Using a full-screen window breaks mouse capture on the Pi's LXDE
// GUI environment. Force the session to use windowed mode (which won't