src/video/x11/SDL_x11window.c
changeset 13534 24e8a27fa627
parent 13533 867352e06641
child 13535 dbcccb065928
     1.1 --- a/src/video/x11/SDL_x11window.c	Mon Feb 17 15:00:02 2020 -0500
     1.2 +++ b/src/video/x11/SDL_x11window.c	Mon Feb 17 15:02:37 2020 -0500
     1.3 @@ -824,7 +824,7 @@
     1.4      /* Wait a brief time to see if the window manager decided to let this move happen.
     1.5         If the window changes at all, even to an unexpected value, we break out. */
     1.6      timeout = SDL_GetTicks() + 100;
     1.7 -    do {
     1.8 +    while (SDL_TRUE) {
     1.9          int x, y;
    1.10          X11_XSync(display, False);
    1.11          X11_XGetWindowAttributes(display, data->xwindow, &attrs);
    1.12 @@ -839,8 +839,12 @@
    1.13              break;  /* we're at the place we wanted to be anyhow, drop out. */
    1.14          }
    1.15  
    1.16 +        if (SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
    1.17 +            break;
    1.18 +        }
    1.19 +
    1.20          SDL_Delay(10);
    1.21 -    } while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout));
    1.22 +    }
    1.23  }
    1.24  
    1.25  void