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 3896 1a327643e741
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
--- a/src/video/x11/SDL_x11wm.c	Sun Nov 12 21:23:57 2006 +0000
+++ b/src/video/x11/SDL_x11wm.c	Mon Nov 13 03:58:22 2006 +0000
@@ -369,6 +369,8 @@
 
 		/* Make sure we register input focus */
 		SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS);
+		/* Since we grabbed the pointer, we have mouse focus, too. */
+		SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
 	}
 	XSync(SDL_Display, False);