From: Dave Airlie <airlied@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/2] gtk: don't warp point in absolute mode
Date: Tue, 10 Dec 2013 11:04:33 +1000 [thread overview]
Message-ID: <1386637474-8165-2-git-send-email-airlied@gmail.com> (raw)
In-Reply-To: <1386637474-8165-1-git-send-email-airlied@gmail.com>
From: Dave Airlie <airlied@redhat.com>
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 <airlied@redhat.com>
---
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
next prev parent reply other threads:[~2013-12-10 1:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 1:04 [Qemu-devel] gtk cursor patches Dave Airlie
2013-12-10 1:04 ` Dave Airlie [this message]
2013-12-10 1:04 ` [Qemu-devel] [PATCH 2/2] gtk: respect cursor visibility Dave Airlie
2013-12-10 5:36 ` [Qemu-devel] gtk cursor patches Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386637474-8165-2-git-send-email-airlied@gmail.com \
--to=airlied@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).