diff src/device-tty.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 74fd4e045ea6
children
line wrap: on
line diff
--- a/src/device-tty.c	Mon Aug 13 11:19:22 2007 +0200
+++ b/src/device-tty.c	Mon Aug 13 11:20:41 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;
@@ -151,6 +155,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))