Remove old keyboard/mouse grabber cruft.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2002-08-21 01:55:31 +00:00
parent c12518de26
commit 1489ee8648

View file

@ -536,11 +536,9 @@ X11_GrabKeyboardBool(qboolean yes)
} }
void void
X11_GrabKeyboard (void) X11_UngrabKeyboard (void)
{ {
XGrabKeyboard (x_disp, x_win, 1, GrabModeAsync, GrabModeAsync, XUngrabKeyboard (x_disp, CurrentTime);
CurrentTime);
XSetInputFocus (x_disp, x_win, RevertToPointerRoot, CurrentTime);
} }
void void
@ -561,16 +559,8 @@ X11_GrabMouseBool (qboolean yes)
XUngrabPointer (x_disp, CurrentTime); XUngrabPointer (x_disp, CurrentTime);
is_grabbed = false; is_grabbed = false;
XWarpPointer (x_disp, x_win, x_win, XWarpPointer (x_disp, x_win, x_win, 0, 0, 0, 0, vid.width / 2,
0, 0, 0, 0, vid.height / 2);
vid.width / 2, vid.height / 2);
}
void
X11_GrabMouse(void)
{
XGrabPointer (x_disp, x_win, True, MOUSE_MASK, GrabModeAsync,
GrabModeAsync, x_win, None, CurrentTime);
} }
void void
@ -582,13 +572,7 @@ X11_UngrabMouse(void)
} }
void void
X11_UngrabKeyboard (void) X11_Grabber (qboolean grab)
{
XUngrabKeyboard (x_disp, CurrentTime);
}
void
X11_Grabber(qboolean grab)
{ {
if (!vid_context_created) { if (!vid_context_created) {
Con_Printf ("No video context to grab to!\n"); Con_Printf ("No video context to grab to!\n");
@ -597,21 +581,6 @@ X11_Grabber(qboolean grab)
X11_GrabMouseBool (grab); X11_GrabMouseBool (grab);
X11_GrabKeyboardBool (grab); X11_GrabKeyboardBool (grab);
#if 0
if (grab) {
if (!is_grabbed) {
X11_GrabKeyboard ();
X11_GrabMouse ();
is_grabbed = true;
}
} else {
if (is_grabbed) {
X11_UngrabKeyboard ();
X11_UngrabMouse ();
is_grabbed = false;
}
}
#endif
XSync (x_disp, false); XSync (x_disp, false);
} }