فهرست منبع

Fixed bug #7515 - Window still grabbed after destroying

Sylvain 2 سال پیش
والد
کامیت
e494844e9a
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      src/video/SDL_video.c

+ 4 - 0
src/video/SDL_video.c

@@ -3454,6 +3454,10 @@ void SDL_DestroyWindow(SDL_Window *window)
         _this->DestroyWindow(_this, window);
     }
 
+    if (_this->grabbed_window == window) {
+        _this->grabbed_window = NULL; /* ungrabbing input. */
+    }
+
     /* Now invalidate magic */
     window->magic = NULL;