aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorStefan Monnier2008-09-12 04:10:59 +0000
committerStefan Monnier2008-09-12 04:10:59 +0000
commited5ff21d09be6c15cefcc000fe266604a4c83544 (patch)
tree5c34b6717780c1f0afc537ecd77d4e4584930ecc /src/keyboard.c
parentda39107c7b70daf7dc0a160936bdb565bbc36918 (diff)
downloademacs-ed5ff21d09be6c15cefcc000fe266604a4c83544.tar.gz
emacs-ed5ff21d09be6c15cefcc000fe266604a4c83544.zip
* term.c (close_gpm): New fun extracted from Fgpm_mouse_stop.
(Fgpm_mouse_stop): Use it. * termhooks.h (close_gpm): Declare. * keyboard.c (tty_read_avail_input): Forcefully close the gpm connection if Gpm_GetEvent fails.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 5015155d97f..cd18b91abf1 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7110,6 +7110,9 @@ tty_read_avail_input (struct terminal *terminal,
7110 while (gpm = Gpm_GetEvent (&event), gpm == 1) { 7110 while (gpm = Gpm_GetEvent (&event), gpm == 1) {
7111 nread += handle_one_term_event (tty, &event, &hold_quit); 7111 nread += handle_one_term_event (tty, &event, &hold_quit);
7112 } 7112 }
7113 if (gpm < 0)
7114 /* Presumably the GPM daemon has closed the connection. */
7115 close_gpm ();
7113 if (hold_quit.kind != NO_EVENT) 7116 if (hold_quit.kind != NO_EVENT)
7114 kbd_buffer_store_event (&hold_quit); 7117 kbd_buffer_store_event (&hold_quit);
7115 if (nread) 7118 if (nread)