aboutsummaryrefslogtreecommitdiff
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2014-03-13 15:30:24 -0400
committerGerd Hoffmann <kraxel@redhat.com>2014-03-17 14:34:28 +0100
commit2bda66028b4962c36d4eabe2995edab12df93691 (patch)
treeed09fd57e5e2fc03eb9a67aed4c658d860b6d97e /ui/gtk.c
parent298526fe92d0b35ea343f8ddcc3a1d54cb422494 (diff)
downloadqemu-2bda66028b4962c36d4eabe2995edab12df93691.zip
qemu-2bda66028b4962c36d4eabe2995edab12df93691.tar.gz
qemu-2bda66028b4962c36d4eabe2995edab12df93691.tar.bz2
gtk: Don't warp absolute pointer
This matches the behavior of SDL, and makes the mouse usable when using -display gtk -vga qxl https://bugzilla.redhat.com/show_bug.cgi?id=1051724 Signed-off-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index e2394ac..baabf86 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -340,6 +340,10 @@ static void gd_mouse_set(DisplayChangeListener *dcl,
GdkDeviceManager *mgr;
gint x_root, y_root;
+ if (qemu_input_is_absolute()) {
+ return;
+ }
+
dpy = gtk_widget_get_display(s->drawing_area);
mgr = gdk_display_get_device_manager(dpy);
gdk_window_get_root_coords(gtk_widget_get_window(s->drawing_area),
@@ -355,6 +359,10 @@ static void gd_mouse_set(DisplayChangeListener *dcl,
GtkDisplayState *s = container_of(dcl, GtkDisplayState, dcl);
gint x_root, y_root;
+ if (qemu_input_is_absolute()) {
+ return;
+ }
+
gdk_window_get_root_coords(gtk_widget_get_window(s->drawing_area),
x, y, &x_root, &y_root);
gdk_display_warp_pointer(gtk_widget_get_display(s->drawing_area),