Fixed mouse grab going fullscreen to windowed in Windows
authorSam Lantinga <slouken@libsdl.org>
Mon, 19 Aug 2002 02:34:22 +0000
changeset 44716d0449891b8
parent 446 92328a8635fe
child 448 323c766f5a46
Fixed mouse grab going fullscreen to windowed in Windows
src/video/wincommon/SDL_sysevents.c
     1.1 --- a/src/video/wincommon/SDL_sysevents.c	Sun Aug 18 19:22:42 2002 +0000
     1.2 +++ b/src/video/wincommon/SDL_sysevents.c	Mon Aug 19 02:34:22 2002 +0000
     1.3 @@ -438,22 +438,21 @@
     1.4  		return(0);
     1.5  #endif /* WM_GETMINMAXINFO */
     1.6  
     1.7 -		case WM_MOVE: {
     1.8 +		case WM_WINDOWPOSCHANGED: {
     1.9  			SDL_VideoDevice *this = current_video;
    1.10 +			int w, h;
    1.11  
    1.12  			GetClientRect(SDL_Window, &SDL_bounds);
    1.13  			ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds);
    1.14  			ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1);
    1.15 +			w = SDL_bounds.right-SDL_bounds.left;
    1.16 +			h = SDL_bounds.bottom-SDL_bounds.top;
    1.17  			if ( this->input_grab != SDL_GRAB_OFF ) {
    1.18  				ClipCursor(&SDL_bounds);
    1.19  			}
    1.20 -		}
    1.21 -		break;
    1.22 -	
    1.23 -		case WM_SIZE: {
    1.24 -			if ( SDL_PublicSurface &&
    1.25 +			if ( SDL_PublicSurface && 
    1.26  				(SDL_PublicSurface->flags & SDL_RESIZABLE) ) {
    1.27 -				SDL_PrivateResize(LOWORD(lParam), HIWORD(lParam));
    1.28 +				SDL_PrivateResize(w, h);
    1.29  			}
    1.30  			return(0);
    1.31  		}