src/video/x11/SDL_x11mouse.c
branchSDL-1.3
changeset 1657 5b0805ceb50f
parent 1575 3ba88cb7eb1b
child 1662 782fd950bd46
child 1895 c121d94672cb
child 3930 79a4c9017550
     1.1 --- a/src/video/x11/SDL_x11mouse.c	Thu Apr 27 09:09:48 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11mouse.c	Fri Apr 28 16:55:41 2006 +0000
     1.3 @@ -226,6 +226,7 @@
     1.4  /* Check to see if we need to enter or leave mouse relative mode */
     1.5  void X11_CheckMouseModeNoLock(_THIS)
     1.6  {
     1.7 +	const Uint8 full_focus = (SDL_APPACTIVE|SDL_APPINPUTFOCUS|SDL_APPMOUSEFOCUS);
     1.8  	char *env_override;
     1.9  	int enable_relative = 1;
    1.10  
    1.11 @@ -242,7 +243,7 @@
    1.12  	if ( enable_relative &&
    1.13  	     !(SDL_cursorstate & CURSOR_VISIBLE) &&
    1.14  	     (this->input_grab != SDL_GRAB_OFF) &&
    1.15 -             (SDL_GetAppState() & SDL_APPACTIVE) ) {
    1.16 +             (SDL_GetAppState() & full_focus) == full_focus ) {
    1.17  		if ( ! mouse_relative ) {
    1.18  			X11_EnableDGAMouse(this);
    1.19  			if ( ! (using_dga & DGA_MOUSE) ) {