diff --git a/src/video/wincommon/SDL_sysevents.c b/src/video/wincommon/SDL_sysevents.c index 87a6e3318..521a2a0e7 100644 --- a/src/video/wincommon/SDL_sysevents.c +++ b/src/video/wincommon/SDL_sysevents.c @@ -565,15 +565,13 @@ LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) int w, h; GetClientRect(SDL_Window, &SDL_bounds); - ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds); - ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1); - if ( SDL_bounds.left || SDL_bounds.top ) { - SDL_windowX = SDL_bounds.left; - SDL_windowY = SDL_bounds.top; - } + SDL_windowX = SDL_bounds.left; + SDL_windowY = SDL_bounds.top; w = SDL_bounds.right-SDL_bounds.left; h = SDL_bounds.bottom-SDL_bounds.top; if ( this->input_grab != SDL_GRAB_OFF ) { + ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds); + ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1); ClipCursor(&SDL_bounds); } if ( SDL_PublicSurface &&