diff -r 867352e06641 -r 24e8a27fa627 src/video/x11/SDL_x11window.c --- a/src/video/x11/SDL_x11window.c Mon Feb 17 15:00:02 2020 -0500 +++ b/src/video/x11/SDL_x11window.c Mon Feb 17 15:02:37 2020 -0500 @@ -824,7 +824,7 @@ /* Wait a brief time to see if the window manager decided to let this move happen. If the window changes at all, even to an unexpected value, we break out. */ timeout = SDL_GetTicks() + 100; - do { + while (SDL_TRUE) { int x, y; X11_XSync(display, False); X11_XGetWindowAttributes(display, data->xwindow, &attrs); @@ -839,8 +839,12 @@ break; /* we're at the place we wanted to be anyhow, drop out. */ } + if (SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) { + break; + } + SDL_Delay(10); - } while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)); + } } void