diff options
Diffstat (limited to '0001-widget-Only-show-the-cursor-on-motion-if-moved.patch')
-rw-r--r-- | 0001-widget-Only-show-the-cursor-on-motion-if-moved.patch | 39 |
1 files changed, 39 insertions, 0 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 000000000000..5935eae80ea9 --- /dev/null +++ b/0001-widget-Only-show-the-cursor-on-motion-if-moved.patch @@ -0,0 +1,39 @@ +From f54c7051b61c0ab935fe64e6a69503ce3430bb9b Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Mon, 14 Sep 2015 14:22:35 +0200 +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.cc | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/vte.cc b/src/vte.cc +index 55e57dd3270a..1ec07a945812 100644 +--- a/src/vte.cc ++++ b/src/vte.cc +@@ -7321,8 +7321,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) { +-- +2.1.0 + |