Fixed bug #7515 - Window still grabbed after destroying
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 5f9eb2f..7e77491 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3268,6 +3268,10 @@ void SDL_DestroyWindow(SDL_Window *window)
display->fullscreen_window = NULL;
}
+ if (_this->grabbed_window == window) {
+ _this->grabbed_window = NULL; /* ungrabbing input. */
+ }
+
/* Now invalidate magic */
window->magic = NULL;