diff src/video/wincommon/SDL_sysevents.c @ 1290:c4a5a772c5d9

The event code was fine, and calculated the SDL_windowX/Y correctly. What we really needed to do was avoid doing client rect adjustment on zoomed windows. :)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 29 Jan 2006 18:17:35 +0000
parents ea3888b472bf
children 31331c444ea2
line wrap: on
line diff
--- a/src/video/wincommon/SDL_sysevents.c	Sun Jan 29 09:19:55 2006 +0000
+++ b/src/video/wincommon/SDL_sysevents.c	Sun Jan 29 18:17:35 2006 +0000
@@ -566,13 +566,13 @@
 			int w, h;
 
 			GetClientRect(SDL_Window, &SDL_bounds);
+			ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds);
+			ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1);
 			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 &&