gtk: update mouse position in mouse_set()
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 1 Jul 2014 17:12:45 +0000 (19:12 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 6 May 2015 06:38:05 +0000 (08:38 +0200)
Without that the next mouse motion event uses the old position
as base for relative move calculation, giving wrong results and
making your mouse pointer jump around.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/gtk.c

index 8b1458f7b41e1608723fdc0981b5be372d95d680..c58028f172a6940ea769b5d999bea3933b0bda27 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -463,6 +463,8 @@ static void gd_mouse_set(DisplayChangeListener *dcl,
     gdk_device_warp(gdk_device_manager_get_client_pointer(mgr),
                     gtk_widget_get_screen(vc->gfx.drawing_area),
                     x_root, y_root);
+    vc->s->last_x = x;
+    vc->s->last_y = y;
 }
 #else
 static void gd_mouse_set(DisplayChangeListener *dcl,