mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[x11] Remove -nomouse handling
After a lot of thought, it really doesn't make sense to have an option to block mouse input in x11 (not grabbing or similar does make sense, of course). Not initializing mouse input made perfect sense in DOS and even console Linux (SVGA) what with the low level access.
This commit is contained in:
parent
c3ce12de4c
commit
0c1927d631
1 changed files with 14 additions and 21 deletions
|
@ -1403,14 +1403,12 @@ IN_X11_Preinit (void)
|
|||
X11_AddEvent (EnterNotify, &enter_notify);
|
||||
X11_AddEvent (LeaveNotify, &leave_notify);
|
||||
|
||||
if (!COM_CheckParm ("-nomouse")) {
|
||||
if ((x11_have_xi = in_x11_check_xi2 ())) {
|
||||
X11_AddEvent (GenericEvent, &event_generic);
|
||||
} else {
|
||||
X11_AddEvent (MotionNotify, &event_motion);
|
||||
X11_AddEvent (ButtonPress, &event_button);
|
||||
X11_AddEvent (ButtonRelease, &event_button);
|
||||
}
|
||||
if (x11_have_xi) {
|
||||
X11_AddEvent (GenericEvent, &event_generic);
|
||||
} else {
|
||||
X11_AddEvent (MotionNotify, &event_motion);
|
||||
X11_AddEvent (ButtonPress, &event_button);
|
||||
X11_AddEvent (ButtonRelease, &event_button);
|
||||
}
|
||||
|
||||
Cmd_AddCommand ("in_paste_buffer", in_paste_buffer_f,
|
||||
|
@ -1426,15 +1424,13 @@ IN_X11_Postinit (void)
|
|||
if (!x_win)
|
||||
Sys_Error ("IN: No window!!");
|
||||
|
||||
if (!COM_CheckParm ("-nomouse")) {
|
||||
if (x11_have_xi) {
|
||||
in_x11_xi_select_events ();
|
||||
in_x11_xi_setup_grabs ();
|
||||
} else {
|
||||
dga_avail = VID_CheckDGA (x_disp, NULL, NULL, NULL);
|
||||
Sys_MaskPrintf (SYS_vid, "VID_CheckDGA returned %d\n",
|
||||
dga_avail);
|
||||
}
|
||||
if (x11_have_xi) {
|
||||
in_x11_xi_select_events ();
|
||||
in_x11_xi_setup_grabs ();
|
||||
} else {
|
||||
dga_avail = VID_CheckDGA (x_disp, NULL, NULL, NULL);
|
||||
Sys_MaskPrintf (SYS_vid, "VID_CheckDGA returned %d\n",
|
||||
dga_avail);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1444,10 +1440,7 @@ in_x11_init (void *data)
|
|||
x11_fd = ConnectionNumber (x_disp);
|
||||
|
||||
x11_add_device (&x11_keyboard_device);
|
||||
|
||||
if (!COM_CheckParm ("-nomouse")) {
|
||||
x11_add_device (&x11_mouse_device);
|
||||
}
|
||||
x11_add_device (&x11_mouse_device);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue