comparison 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
comparison
equal deleted inserted replaced
1289:c07c6ef7c93e 1290:c4a5a772c5d9
564 case WM_WINDOWPOSCHANGED: { 564 case WM_WINDOWPOSCHANGED: {
565 SDL_VideoDevice *this = current_video; 565 SDL_VideoDevice *this = current_video;
566 int w, h; 566 int w, h;
567 567
568 GetClientRect(SDL_Window, &SDL_bounds); 568 GetClientRect(SDL_Window, &SDL_bounds);
569 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds);
570 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1);
569 SDL_windowX = SDL_bounds.left; 571 SDL_windowX = SDL_bounds.left;
570 SDL_windowY = SDL_bounds.top; 572 SDL_windowY = SDL_bounds.top;
571 w = SDL_bounds.right-SDL_bounds.left; 573 w = SDL_bounds.right-SDL_bounds.left;
572 h = SDL_bounds.bottom-SDL_bounds.top; 574 h = SDL_bounds.bottom-SDL_bounds.top;
573 if ( this->input_grab != SDL_GRAB_OFF ) { 575 if ( this->input_grab != SDL_GRAB_OFF ) {
574 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds);
575 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1);
576 ClipCursor(&SDL_bounds); 576 ClipCursor(&SDL_bounds);
577 } 577 }
578 if ( SDL_PublicSurface && 578 if ( SDL_PublicSurface &&
579 (SDL_PublicSurface->flags & SDL_RESIZABLE) ) { 579 (SDL_PublicSurface->flags & SDL_RESIZABLE) ) {
580 SDL_PrivateResize(w, h); 580 SDL_PrivateResize(w, h);