summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-07-01 19:12:45 +0200
committerGerd Hoffmann <kraxel@redhat.com>2015-05-06 08:38:05 +0200
commit1271f7f7c60e0b0a3cc031921008a69dfd53bd34 (patch)
treede3ba6c612dbcd5f2429fbe4fa3f715e028295bb /ui
parentdc7ff344187db6a94294a87d63cf8332e8ed0e6f (diff)
downloadqemu-1271f7f7c60e0b0a3cc031921008a69dfd53bd34.tar.gz
qemu-1271f7f7c60e0b0a3cc031921008a69dfd53bd34.tar.bz2
qemu-1271f7f7c60e0b0a3cc031921008a69dfd53bd34.zip
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 <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 8b1458f7b4..c58028f172 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,