added vid_grabkeyboard cvar which defaults to 0, this means that the glx client no...
[xonotic/darkplaces.git] / vid_glx.c
index de1ac66..96bf36f 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -287,7 +287,8 @@ static void IN_Activate (qboolean grab)
 #endif
                                XWarpPointer(vidx11_display, None, win, 0, 0, 0, 0, vid.width / 2, vid.height / 2);
 
-                       XGrabKeyboard(vidx11_display, win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
+                       if (vid_grabkeyboard.integer)
+                               XGrabKeyboard(vidx11_display, win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
 
                        mouse_x = mouse_y = 0;
                        cl_ignoremousemove = true;