[vte3/f18] Only show the cursor on motion if moved

Bastien Nocera hadess at fedoraproject.org
Fri Nov 16 15:27:01 UTC 2012


commit 9e9d1e0acf6162064b6e0838834091b0f90891f1
Author: Bastien Nocera <hadess at hadess.net>
Date:   Fri Nov 16 16:26:57 2012 +0100

    Only show the cursor on motion if moved

 ...t-Only-show-the-cursor-on-motion-if-moved.patch |   39 ++++++++++++++++++++
 vte3.spec                                          |    8 ++++-
 2 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/0001-widget-Only-show-the-cursor-on-motion-if-moved.patch b/0001-widget-Only-show-the-cursor-on-motion-if-moved.patch
new file mode 100644
index 0000000..6195e27
--- /dev/null
+++ b/0001-widget-Only-show-the-cursor-on-motion-if-moved.patch
@@ -0,0 +1,39 @@
+From 9077ef68bebee9a22d836a00af72aa02d5628ed4 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Fri, 16 Nov 2012 16:18:05 +0100
+Subject: [PATCH] widget: Only show the cursor on motion if moved
+
+Some devices, like Wacom tablets, will emit mouse motion
+events even when the mouse doesn't move on the tablet. This
+means that the mouse cursor will show up on the screen very shortly
+after hiding.
+
+We now check the motion event against the last location of the
+mouse cursor to avoid this behaviour.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=688456
+---
+ src/vte.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/vte.c b/src/vte.c
+index bbe6cf6..c5922e6 100644
+--- a/src/vte.c
++++ b/src/vte.c
+@@ -7294,8 +7294,11 @@ vte_terminal_motion_notify(GtkWidget *widget, GdkEventMotion *event)
+ 	} else {
+ 		/* Hilite any matches. */
+ 		vte_terminal_match_hilite(terminal, x, y);
+-		/* Show the cursor. */
+-		_vte_terminal_set_pointer_visible(terminal, TRUE);
++		/* Show the cursor if we moved. */
++		if (event->type != GDK_MOTION_NOTIFY ||
++		    x != terminal->pvt->mouse_last_x ||
++		    y != terminal->pvt->mouse_last_y)
++			_vte_terminal_set_pointer_visible(terminal, TRUE);
+ 	}
+ 
+ 	switch (event->type) {
+-- 
+1.8.0
+
diff --git a/vte3.spec b/vte3.spec
index 589d218..18d2bae 100644
--- a/vte3.spec
+++ b/vte3.spec
@@ -1,6 +1,6 @@
 Name: vte3
 Version: 0.34.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: A terminal emulator
 License: LGPLv2+
 Group: User Interface/X
@@ -9,6 +9,8 @@ Source: http://download.gnome.org/sources/vte/0.34/vte-%{version}.tar.xz
 Patch0: honey-I-shrank-the-terminal.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=663779
 Patch1: vte-alt-meta-confusion.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=688456
+Patch2: 0001-widget-Only-show-the-cursor-on-motion-if-moved.patch
 
 BuildRequires: gtk3-devel >= 3.0.0
 BuildRequires: ncurses-devel
@@ -40,6 +42,7 @@ vte.
 %setup -q -n vte-%{version}
 %patch0 -p1 -b .grow-up
 %patch1 -p1 -b .alt-meta
+%patch2 -p1 -b .motion
 
 %build
 %configure \
@@ -84,6 +87,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 
 
 %changelog
+* Fri Nov 16 2012 Bastien Nocera <bnocera at redhat.com> 0.34.2-2
+- Only show the cursor on motion if moved
+
 * Tue Nov 13 2012 Kalev Lember <kalevlember at gmail.com> - 0.34.2-1
 - Update to 0.34.2
 


More information about the scm-commits mailing list