XEmacs 21.2.22 "Mercedes".
[chise/xemacs-chise.git.1] / src / event-Xt.c
index 3417197..4bea4e7 100644 (file)
@@ -2034,9 +2034,6 @@ emacs_Xt_select_console (struct console *con)
 {
   Lisp_Object console;
   int infd;
-#ifdef HAVE_GPM
-  int mousefd;
-#endif
 
   if (CONSOLE_X_P (con))
     return; /* X consoles are automatically selected for when we
@@ -2044,22 +2041,6 @@ emacs_Xt_select_console (struct console *con)
   infd = event_stream_unixoid_select_console (con);
   XSETCONSOLE (console, con);
   select_filedesc (infd, console);
-#ifdef HAVE_GPM
-  /* On a stream device (ie: noninteractive), bad things can happen. */
-  if (EQ (CONSOLE_TYPE (con), Qtty)) {
-    mousefd = CONSOLE_TTY_MOUSE_FD (con);
-       /* We check filedesc_to_what_closure[fd] here because if you run
-       ** XEmacs from a TTY, it will fire up GPM, select the mouse fd, then
-       ** if you run gnuattach to connect to another TTY, it will fire up
-       ** GPM again, and try to reselect the mouse fd.  GPM uses the same
-       ** fd for every connection apparently, and select_filedesc will
-       ** fail its assertion if we try to select it twice.
-       */
-    if ((mousefd >= 0) && !filedesc_to_what_closure[mousefd]) {
-      select_filedesc (mousefd, console);
-    }
-  }
-#endif
 }
 
 static void
@@ -2067,9 +2048,6 @@ emacs_Xt_unselect_console (struct console *con)
 {
   Lisp_Object console;
   int infd;
-#ifdef HAVE_GPM
-  int mousefd;
-#endif
 
   if (CONSOLE_X_P (con))
     return; /* X consoles are automatically selected for when we
@@ -2077,15 +2055,6 @@ emacs_Xt_unselect_console (struct console *con)
   infd = event_stream_unixoid_unselect_console (con);
   XSETCONSOLE (console, con);
   unselect_filedesc (infd);
-#ifdef HAVE_GPM
-  /* On a stream device (ie: noninteractive), bad things can happen. */
-  if (EQ (CONSOLE_TYPE (con), Qtty)) {
-    mousefd = CONSOLE_TTY_MOUSE_FD (con);
-    if (mousefd >= 0) {
-      unselect_filedesc (mousefd);
-    }
-  }
-#endif
 }
 
 /* read an event from a tty, if one is available.  Returns non-zero