You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
3 years ago
|
From 9077ef68bebee9a22d836a00af72aa02d5628ed4 Mon Sep 17 00:00:00 2001
|
||
|
From: Bastien Nocera <hadess@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
|
||
|
|