comparison src/video/wincommon/SDL_sysevents.c @ 447:16d0449891b8

Fixed mouse grab going fullscreen to windowed in Windows
author Sam Lantinga <slouken@libsdl.org>
date Mon, 19 Aug 2002 02:34:22 +0000
parents 518ffd98a8f6
children 24edec3cafe4
comparison
equal deleted inserted replaced
446:92328a8635fe 447:16d0449891b8
436 info->ptMaxTrackSize.y = height; 436 info->ptMaxTrackSize.y = height;
437 } 437 }
438 return(0); 438 return(0);
439 #endif /* WM_GETMINMAXINFO */ 439 #endif /* WM_GETMINMAXINFO */
440 440
441 case WM_MOVE: { 441 case WM_WINDOWPOSCHANGED: {
442 SDL_VideoDevice *this = current_video; 442 SDL_VideoDevice *this = current_video;
443 int w, h;
443 444
444 GetClientRect(SDL_Window, &SDL_bounds); 445 GetClientRect(SDL_Window, &SDL_bounds);
445 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds); 446 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds);
446 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1); 447 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1);
448 w = SDL_bounds.right-SDL_bounds.left;
449 h = SDL_bounds.bottom-SDL_bounds.top;
447 if ( this->input_grab != SDL_GRAB_OFF ) { 450 if ( this->input_grab != SDL_GRAB_OFF ) {
448 ClipCursor(&SDL_bounds); 451 ClipCursor(&SDL_bounds);
449 } 452 }
450 } 453 if ( SDL_PublicSurface &&
451 break;
452
453 case WM_SIZE: {
454 if ( SDL_PublicSurface &&
455 (SDL_PublicSurface->flags & SDL_RESIZABLE) ) { 454 (SDL_PublicSurface->flags & SDL_RESIZABLE) ) {
456 SDL_PrivateResize(LOWORD(lParam), HIWORD(lParam)); 455 SDL_PrivateResize(w, h);
457 } 456 }
458 return(0); 457 return(0);
459 } 458 }
460 break; 459 break;
461 460