mirror of https://github.com/encounter/SDL.git
x11: Update the display when the WM changes a window's fullscreen state.
Fixes #5390.
This commit is contained in:
parent
edb473cf46
commit
67e0f546c5
|
@ -1449,11 +1449,15 @@ X11_DispatchEvent(_THIS, XEvent *xevent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed & SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
|
||||||
/* FULLSCREEN_DESKTOP encompasses two bits: SDL_WINDOW_FULLSCREEN, plus a bit to note it's FULLSCREEN_DESKTOP */
|
/* FULLSCREEN_DESKTOP encompasses two bits: SDL_WINDOW_FULLSCREEN, plus a bit to note it's FULLSCREEN_DESKTOP */
|
||||||
|
if (changed & SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
||||||
|
SDL_VideoDisplay *viddisplay = SDL_GetDisplayForWindow(data->window);
|
||||||
const Uint32 fsmasked = flags & SDL_WINDOW_FULLSCREEN_DESKTOP;
|
const Uint32 fsmasked = flags & SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||||
data->window->flags &= ~SDL_WINDOW_FULLSCREEN_DESKTOP;
|
data->window->flags &= ~SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||||
data->window->flags |= fsmasked;
|
data->window->flags |= fsmasked;
|
||||||
|
if (viddisplay) {
|
||||||
|
viddisplay->fullscreen_window = fsmasked ? data->window : NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed & SDL_WINDOW_MAXIMIZED) {
|
if (changed & SDL_WINDOW_MAXIMIZED) {
|
||||||
|
|
Loading…
Reference in New Issue