mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-31 13:40:38 +00:00
Force SDL to minimize the window when focus is lost, fix #360
This was changed in SDL 2.0.14 and causes problems on several platforms and window managers. Fix taken from Yamagi Quake II
This commit is contained in:
parent
fa8ab0ca49
commit
8eb91c79cb
1 changed files with 11 additions and 0 deletions
|
@ -2896,6 +2896,17 @@ void idCommonLocal::Init( int argc, char **argv ) {
|
|||
|
||||
Sys_InitThreads();
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
/* Force the window to minimize when focus is lost. This was the
|
||||
* default behavior until SDL 2.0.12 and changed with 2.0.14.
|
||||
* The windows staying maximized has some odd implications for
|
||||
* window ordering under Windows and some X11 window managers
|
||||
* like kwin. See:
|
||||
* * https://github.com/libsdl-org/SDL/issues/4039
|
||||
* * https://github.com/libsdl-org/SDL/issues/3656 */
|
||||
SDL_SetHint( SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1" );
|
||||
#endif
|
||||
|
||||
try {
|
||||
|
||||
// set interface pointers used by idLib
|
||||
|
|
Loading…
Reference in a new issue