[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] gtk: don't warp point in absolute mode
From: |
Dave Airlie |
Subject: |
[Qemu-devel] [PATCH 1/2] gtk: don't warp point in absolute mode |
Date: |
Tue, 10 Dec 2013 11:04:33 +1000 |
From: Dave Airlie <address@hidden>
This makes gtk act the same way as the current sdl backend, which doesn't
do the warp in this case.
If your guest GPU has hw pointer this leads you get endless loops where the
warp causes motion causes input events, causes the guest to move the cursor
causes warp.
Signed-off-by: Dave Airlie <address@hidden>
---
ui/gtk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 6316f5b..2abf289 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -338,6 +338,9 @@ static void gd_mouse_set(DisplayChangeListener *dcl,
GdkDeviceManager *mgr;
gint x_root, y_root;
+ if (kbd_mouse_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),
--
1.8.3.1