瀏覽代碼

video: Update the current display when moving a window programmatically

When moving a window programmatically, the move event will be deduplicated due to the window x and y coordinates already being updated, so the window's current display ID needs to be explicitly updated.
Frank Praznik 2 年之前
父節點
當前提交
d9fadb8b47
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video/SDL_video.c

+ 1 - 0
src/video/SDL_video.c

@@ -2201,6 +2201,7 @@ int SDL_SetWindowPosition(SDL_Window *window, int x, int y)
     } else {
         window->x = x;
         window->y = y;
+        window->last_displayID = SDL_GetDisplayForWindow(window);
 
         if (_this->SetWindowPosition) {
             _this->SetWindowPosition(_this, window);