From 75a8734b11821d807cf64b42c66f8fe141ad4e5e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 27 Sep 2007 21:20:07 +0000 Subject: [PATCH] (narrow_foreground_group, widen_foreground_group): Static. (init_sys_modes): Check that gpm_tty is the current tty. --- src/ChangeLog | 3 +++ src/sysdep.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ae40cbcddd0..e1408227092 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2007-09-27 Stefan Monnier + * sysdep.c (narrow_foreground_group, widen_foreground_group): Static. + (init_sys_modes): Check that gpm_tty is the current tty. + * alloc.c (allocate_terminal): Set the vector size to only count the lisp fields. Initialize those to nil. (mark_object): Don't treat terminals specially. diff --git a/src/sysdep.c b/src/sysdep.c index 9a7ad5b450f..35a107f34cf 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1192,7 +1192,7 @@ int inherited_pgroup; redirect the tty device handle FD to point to our own process group. We need to be in our own process group to receive SIGIO properly. */ -void +static void narrow_foreground_group (int fd) { int me = getpid (); @@ -1210,7 +1210,7 @@ narrow_foreground_group (int fd) } /* Set the tty to our original foreground group. */ -void +static void widen_foreground_group (int fd) { if (inherited_pgroup != getpid ()) @@ -1752,8 +1752,9 @@ init_sys_modes (tty_out) fcntl (fileno (tty_out->input), F_SETOWN, getpid ()); init_sigio (fileno (tty_out->input)); #ifdef HAVE_GPM - if (gpm_tty) + if (gpm_tty == tty_out) { + /* Arrange for mouse events to give us SIGIO signals. */ fcntl (gpm_fd, F_SETOWN, getpid ()); fcntl (gpm_fd, F_SETFL, fcntl (gpm_fd, F_GETFL, 0) | O_NONBLOCK); init_sigio (gpm_fd); -- 2.11.4.GIT