From 9247e222df6f004f94793cb8c645ab89030b62e1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 13 Nov 2006 03:58:22 +0000 Subject: [PATCH] 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/x11/SDL_x11wm.c b/src/video/x11/SDL_x11wm.c index d82a7a1d6..ba78aac9d 100644 --- a/src/video/x11/SDL_x11wm.c +++ b/src/video/x11/SDL_x11wm.c @@ -369,6 +369,8 @@ SDL_GrabMode X11_GrabInputNoLock(_THIS, SDL_GrabMode mode) /* 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);