From ee0a482a876460e2599cece7a274b78a5983ed18 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 19 May 2019 11:52:25 -0700 Subject: [PATCH] Fixed bug 4401 - SDL_GetWindowPosition() wrong after SDL_SetWindowPosition() until window is moved on macOS Removed incorrect call to SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y); If the position of the window isn't adjusted in the SetWindowPosition() call, then sending the window event would have no effect because x and y equals the window x and y. If the position of the window is adjusted in the SetWindowPosition() call, then we don't want to clobber it with values that the user passed in. --- src/video/SDL_video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index a2856ddc4b134..8c552d9a8cc59 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1895,7 +1895,6 @@ SDL_SetWindowPosition(SDL_Window * window, int x, int y) if (_this->SetWindowPosition) { _this->SetWindowPosition(_this, window); } - SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y); } }