svn commit: r257966 - user/ed/newcons/sys/dev/vt

Aleksandr Rybalko ray at FreeBSD.org
Mon Nov 11 11:30:48 UTC 2013


Author: ray
Date: Mon Nov 11 11:30:47 2013
New Revision: 257966
URL: http://svnweb.freebsd.org/changeset/base/257966

Log:
  Use opt_syscons.h to get defines.
  Define max number of windows as VT_MAXWINDOWS if defined, or as MAXCONS, or 12.
  Define VT_MOUSE_PASTEBUTTON and VT_MOUSE_EXTENDBUTTON if defined
  SC_TWOBUTTON_MOUSE or VT_TWOBUTTON_MOUSE.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  user/ed/newcons/sys/dev/vt/vt.h

Modified: user/ed/newcons/sys/dev/vt/vt.h
==============================================================================
--- user/ed/newcons/sys/dev/vt/vt.h	Mon Nov 11 11:13:12 2013	(r257965)
+++ user/ed/newcons/sys/dev/vt/vt.h	Mon Nov 11 11:30:47 2013	(r257966)
@@ -45,9 +45,26 @@
 #include <sys/terminal.h>
 #include <sys/sysctl.h>
 
+#include "opt_syscons.h"
+
+#ifndef	VT_MAXWINDOWS
+#ifdef	MAXCONS
+#define	VT_MAXWINDOWS	MAXCONS
+#else
 #define	VT_MAXWINDOWS	12
+#endif
+#endif
+
 #define	VT_CONSWINDOW	0
 
+#if defined(SC_TWOBUTTON_MOUSE) || defined(VT_TWOBUTTON_MOUSE)
+#define VT_MOUSE_PASTEBUTTON	MOUSE_BUTTON3DOWN	/* right button */
+#define VT_MOUSE_EXTENDBUTTON	MOUSE_BUTTON2DOWN	/* not really used */
+#else
+#define VT_MOUSE_PASTEBUTTON	MOUSE_BUTTON2DOWN	/* middle button */
+#define VT_MOUSE_EXTENDBUTTON	MOUSE_BUTTON3DOWN	/* right button */
+#endif /* defined(SC_TWOBUTTON_MOUSE) || defined(VT_TWOBUTTON_MOUSE) */
+
 #define	SC_DRIVER_NAME	"vt"
 #define	DPRINTF(_l, ...)	if (vt_debug > (_l)) printf( __VA_ARGS__ )
 #define	ISSIGVALID(sig)	((sig) > 0 && (sig) < NSIG)


More information about the svn-src-user mailing list