mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-24 20:22:11 +03:00
* 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:
parent
60f9328e8d
commit
8ade32d7d9
@ -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>
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user