瀏覽代碼

x11: Don't wait for the window to move if it's already in the place we want it.

Ryan C. Gordon 6 年之前
父節點
當前提交
367a8b9701
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/video/x11/SDL_x11window.c

+ 2 - 0
src/video/x11/SDL_x11window.c

@@ -835,6 +835,8 @@ X11_SetWindowPosition(_THIS, SDL_Window * window)
             window->x = x;
             window->y = y;
             break;  /* window moved, time to go. */
+        } else if ((x == window->x) && (y == window->y)) {
+            break;  /* we're at the place we wanted to be anyhow, drop out. */
         }
 
         SDL_Delay(10);