Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2013 15:37:57 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r259650 - head/sys/dev/vt
Message-ID:  <201312201537.rBKFbv9M013396@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Fri Dec 20 15:37:57 2013
New Revision: 259650
URL: http://svnweb.freebsd.org/changeset/base/259650

Log:
  Set mouse level per window, instead of global.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/vt/vt.h
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt.h
==============================================================================
--- head/sys/dev/vt/vt.h	Fri Dec 20 14:56:52 2013	(r259649)
+++ head/sys/dev/vt/vt.h	Fri Dec 20 15:37:57 2013	(r259650)
@@ -244,6 +244,7 @@ struct vt_window {
 	int			 vw_kbdmode;	/* (?) Keyboard mode. */
 	char			*vw_kbdsq;	/* Escape sequence queue*/
 	unsigned int		 vw_flags;	/* (d) Per-window flags. */
+	int			 vw_mouse_level;/* Mouse op mode. */
 #define	VWF_BUSY	0x1	/* Busy reconfiguring device. */
 #define	VWF_OPENED	0x2	/* TTY in use. */
 #define	VWF_SCROLL	0x4	/* Keys influence scrollback. */

Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c	Fri Dec 20 14:56:52 2013	(r259649)
+++ head/sys/dev/vt/vt_core.c	Fri Dec 20 15:37:57 2013	(r259650)
@@ -633,6 +633,9 @@ vtterm_param(struct terminal *tm, int cm
 	case TP_SHOWCURSOR:
 		vtbuf_cursor_visibility(&vw->vw_buf, arg);
 		break;
+	case TP_MOUSE:
+		vw->vw_mouse_level = arg;
+		break;
 	}
 }
 
@@ -1206,7 +1209,7 @@ vt_mouse_event(int type, int x, int y, i
 	 * under mouse pointer when nothing changed.
 	 */
 
-	if (mlevel > 0)
+	if (vw->vw_mouse_level > 0)
 		vt_mouse_terminput(vd, type, x, y, event, cnt);
 
 	switch (type) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312201537.rBKFbv9M013396>