diff options
| author | Stefan Monnier | 2009-03-27 16:14:23 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-03-27 16:14:23 +0000 |
| commit | d347e4943a371d278f479db89d932f136d6ee659 (patch) | |
| tree | 547f6c4557fb62a0135c1193e2019d6d73255294 /src/term.c | |
| parent | d696b0d53f982b231b26124f180a92a0e7935c06 (diff) | |
| download | emacs-d347e4943a371d278f479db89d932f136d6ee659.tar.gz emacs-d347e4943a371d278f479db89d932f136d6ee659.zip | |
* keyboard.c (tty_read_avail_input): Don't treat a -1 return from
Gpm_GetEvent as an error that justifies closing the filedescriptor.
* term.c (close_gpm): Get the filedescriptor as a (new) parameter.
(Fgpm_mouse_stop): Pass that new parameter.
* termhooks.h (close_gpm): Adjust prototype.
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index 3fbc3c46c4d..6d6bfaf412f 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3150,10 +3150,10 @@ Gpm-mouse can only be activated for one tty at a time. */) | |||
| 3150 | } | 3150 | } |
| 3151 | 3151 | ||
| 3152 | void | 3152 | void |
| 3153 | close_gpm () | 3153 | close_gpm (int fd) |
| 3154 | { | 3154 | { |
| 3155 | if (gpm_fd >= 0) | 3155 | if (fd >= 0) |
| 3156 | delete_gpm_wait_descriptor (gpm_fd); | 3156 | delete_gpm_wait_descriptor (fd); |
| 3157 | while (Gpm_Close()); /* close all the stack */ | 3157 | while (Gpm_Close()); /* close all the stack */ |
| 3158 | gpm_tty = NULL; | 3158 | gpm_tty = NULL; |
| 3159 | } | 3159 | } |
| @@ -3171,7 +3171,7 @@ DEFUN ("gpm-mouse-stop", Fgpm_mouse_stop, Sgpm_mouse_stop, | |||
| 3171 | if (!tty || gpm_tty != tty) | 3171 | if (!tty || gpm_tty != tty) |
| 3172 | return Qnil; /* Not activated on this terminal, nothing to do. */ | 3172 | return Qnil; /* Not activated on this terminal, nothing to do. */ |
| 3173 | 3173 | ||
| 3174 | close_gpm (); | 3174 | close_gpm (gpm_fd); |
| 3175 | return Qnil; | 3175 | return Qnil; |
| 3176 | } | 3176 | } |
| 3177 | #endif /* HAVE_GPM */ | 3177 | #endif /* HAVE_GPM */ |