mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
x11: Fix boolean/enum comparison
This could set the pending flag even if there was no state change requested, which would cause errant sync timeouts in certain situations.
This commit is contained in:
parent
22fb9edd5c
commit
6a3b0413dc
1 changed files with 2 additions and 1 deletions
|
|
@ -1891,7 +1891,8 @@ static SDL_FullscreenResult X11_SetWindowFullscreenViaWM(SDL_VideoDevice *_this,
|
|||
X11_XSendEvent(display, RootWindow(display, displaydata->screen), 0,
|
||||
SubstructureNotifyMask | SubstructureRedirectMask, &e);
|
||||
|
||||
if (!!(window->flags & SDL_WINDOW_FULLSCREEN) != fullscreen) {
|
||||
// Only set the pending flag if the fullscreen state actually changed.
|
||||
if (((window->flags & SDL_WINDOW_FULLSCREEN) != 0) != (fullscreen != 0)) {
|
||||
data->pending_operation |= X11_PENDING_OP_FULLSCREEN;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue