* key.c (get_event): Check gpm_fd before using it in FD_SET. If

gpm_fd is -1 (gpm has died), disable mouse support.
This commit is contained in:
Pavel Roskin 2002-08-25 05:47:47 +00:00
parent 60f9328e8d
commit 8ade32d7d9
2 changed files with 9 additions and 0 deletions

View File

@ -1,8 +1,12 @@
2002-08-25 Pavel Roskin <proski@gnu.org>
* key.c (get_event): Check gpm_fd before using it in FD_SET. If
gpm_fd is -1 (gpm has died), disable mouse support.
* key.c: Use the maximal file descriptor, not FD_SETSIZE in all
calls to select().
* subshell.c: Likewise.
From Pavel Tsekov <ptsekov@gmx.net>
2002-08-24 Pavel Roskin <proski@gnu.org>

View File

@ -713,6 +713,11 @@ int get_event (Gpm_Event *event, int redo_event, int block)
maxfdp = max (add_selects (&select_set), input_fd);
#ifdef HAVE_LIBGPM
if (gpm_fd == -1) {
/* Connection to gpm broken, possibly gpm has died */
mouse_enabled = 0;
use_mouse_p = MOUSE_NONE;
}
if (mouse_enabled && use_mouse_p == MOUSE_GPM) {
FD_SET (gpm_fd, &select_set);
maxfdp = max (maxfdp, gpm_fd);