diff src/device-tty.c @ 155:43dd3413c7c7 r20-3b4

Import from CVS: tag r20-3b4
author cvs
date Mon, 13 Aug 2007 09:39:39 +0200
parents 538048ae2ab8
children 3d6bfa290dbd
line wrap: on
line diff
--- a/src/device-tty.c	Mon Aug 13 09:38:27 2007 +0200
+++ b/src/device-tty.c	Mon Aug 13 09:39:39 2007 +0200
@@ -38,6 +38,10 @@
 
 #include "syssignal.h" /* for SIGWINCH */
 
+#ifdef HAVE_GPM
+#include <gpm.h>
+#endif
+
 #include <errno.h>
 
 Lisp_Object Qinit_pre_tty_win, Qinit_post_tty_win;
@@ -153,6 +157,15 @@
 	  CONSOLE_TTY_DATA (con)->width = width;
 	  CONSOLE_TTY_DATA (con)->height = height;
 
+#ifdef HAVE_GPM
+	  /* We need to tell GPM how big our screen is now
+	  ** I am pretty sure the GPM library will get incredibly confused
+	  ** if you try to connect to more than one mouse-capable device,
+	  ** so I don't think it will cause any more damage in that case.
+	  */
+	  gpm_mx = width;
+	  gpm_my = height;
+#endif
 	  for (tail = DEVICE_FRAME_LIST (d);
 	       !NILP (tail);
 	       tail = XCDR (tail))