From owner-svn-src-all@FreeBSD.ORG Fri Dec 20 15:37:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C94924F5; Fri, 20 Dec 2013 15:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B556F1EA0; Fri, 20 Dec 2013 15:37:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBKFbvGO013398; Fri, 20 Dec 2013 15:37:57 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBKFbv9M013396; Fri, 20 Dec 2013 15:37:57 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312201537.rBKFbv9M013396@svn.freebsd.org> From: Aleksandr Rybalko Date: Fri, 20 Dec 2013 15:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259650 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2013 15:37:57 -0000 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) {