Always send SDL_WINDOWEVENT_SIZE_CHANGED when window is resized SDL_WINDOWEVENT_SIZE_CHANGED is now sent even if the resulting size of the window does not match the requested size.
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index cad77f1..dac8d1c 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2273,12 +2273,14 @@ SDL_SetWindowSize(SDL_Window * window, int w, int h)
SDL_UpdateFullscreenMode(window, SDL_TRUE);
}
} else {
+ int old_w = window->w;
+ int old_h = window->h;
window->w = w;
window->h = h;
if (_this->SetWindowSize) {
_this->SetWindowSize(_this, window);
}
- if (window->w == w && window->h == h) {
+ if (window->w != old_w || window->h != old_h) {
/* We didn't get a SDL_WINDOWEVENT_RESIZED event (by design) */
SDL_OnWindowResized(window);
}