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

Aleksandr Rybalko ray at FreeBSD.org
Mon Nov 11 12:36:19 UTC 2013


Author: ray
Date: Mon Nov 11 12:36:18 2013
New Revision: 257982
URL: http://svnweb.freebsd.org/changeset/base/257982

Log:
  Enable/disable mouse cursor on MOUSE_SHOW/MOUSE_HIDE.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  user/ed/newcons/sys/dev/vt/vt_core.c

Modified: user/ed/newcons/sys/dev/vt/vt_core.c
==============================================================================
--- user/ed/newcons/sys/dev/vt/vt_core.c	Mon Nov 11 12:34:30 2013	(r257981)
+++ user/ed/newcons/sys/dev/vt/vt_core.c	Mon Nov 11 12:36:18 2013	(r257982)
@@ -1266,7 +1266,12 @@ vtterm_ioctl(struct terminal *tm, u_long
 		 */
 		switch (mouse->operation) {
 		case MOUSE_HIDE:
+			vd->vd_flags &= ~VDF_MOUSECURSOR;
+			return (0);
 		case MOUSE_SHOW:
+			vd->vd_mx = vd->vd_width / 2;
+			vd->vd_my = vd->vd_height / 2;
+			vd->vd_flags |= VDF_MOUSECURSOR;
 			return (0);
 		default:
 			return (EINVAL);


More information about the svn-src-user mailing list