X11 backend: tell app that mouse focus has been obtained when grabbing the SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Mon, 13 Nov 2006 03:58:22 +0000
branchSDL-1.2
changeset 38961a327643e741
parent 3895 aeb55f698ee3
child 3897 37dab4a917c4
X11 backend: tell app that mouse focus has been obtained when grabbing the
input. This allows us to enable DGA mode, even when the system cursor was
outside of the window when the grab was initiated.

Fixes Bugzilla #299, which has a more detailed explanation of the issue.
src/video/x11/SDL_x11wm.c
     1.1 --- a/src/video/x11/SDL_x11wm.c	Sun Nov 12 21:23:57 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11wm.c	Mon Nov 13 03:58:22 2006 +0000
     1.3 @@ -369,6 +369,8 @@
     1.4  
     1.5  		/* Make sure we register input focus */
     1.6  		SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS);
     1.7 +		/* Since we grabbed the pointer, we have mouse focus, too. */
     1.8 +		SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
     1.9  	}
    1.10  	XSync(SDL_Display, False);
    1.11