[x11] Don't use select for checking for events

It seems that under certain circumstances (window managers?), select is not
reliable for getting key events, so use of select has been disabled until I
figure out what's going on and how to fix it.
This commit is contained in:
Bill Currie 2021-11-05 13:30:01 +09:00
parent 63f5c738ca
commit 0c8fbf0ce4
1 changed files with 13 additions and 2 deletions

View File

@ -883,7 +883,7 @@ in_x11_grab_input (void *data, int grab)
in_dga_f (in_dga);
}
}
#ifdef X11_USE_SELECT
static void
in_x11_add_select (qf_fd_set *fdset, int *maxfd, void *data)
{
@ -897,10 +897,17 @@ static void
in_x11_check_select (qf_fd_set *fdset, void *data)
{
if (QF_FD_ISSET (x11_fd, fdset)) {
Sys_Printf ("in_x11_check_select\n");
X11_ProcessEvents (); // Get events from X server.
}
}
#else
static void
in_x11_process_events (void *data)
{
X11_ProcessEvents (); // Get events from X server.
}
#endif
static void
in_x11_axis_info (void *data, void *device, in_axisinfo_t *axes, int *numaxes)
{
@ -1032,8 +1039,12 @@ in_x11_clear_states (void *data)
static in_driver_t in_x11_driver = {
.init = in_x11_init,
.shutdown = in_x11_shutdown,
#ifdef X11_USE_SELECT
.add_select = in_x11_add_select,
.check_select = in_x11_check_select,
#else
.process_events = in_x11_process_events,
#endif
.clear_states = in_x11_clear_states,
.grab_input = in_x11_grab_input,