From 1271f7f7c60e0b0a3cc031921008a69dfd53bd34 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 1 Jul 2014 19:12:45 +0200 Subject: gtk: update mouse position in mouse_set() 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 --- ui/gtk.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/gtk.c') diff --git a/ui/gtk.c b/ui/gtk.c index 8b1458f..c58028f 100644 --- 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, -- cgit v1.1