From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
Cole Robinson <crobinso@redhat.com>
Subject: [Qemu-devel] [PULL 3/3] gtk: Don't warp absolute pointer
Date: Mon, 17 Mar 2014 14:39:48 +0100 [thread overview]
Message-ID: <1395063588-27575-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1395063588-27575-1-git-send-email-kraxel@redhat.com>
From: Cole Robinson <crobinso@redhat.com>
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>
---
ui/gtk.c | 8 ++++++++
1 file changed, 8 insertions(+)
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),
--
1.8.3.1
next prev parent reply other threads:[~2014-03-17 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 13:39 [Qemu-devel] [PULL 0/3] gtk fixes Gerd Hoffmann
2014-03-17 13:39 ` [Qemu-devel] [PULL 1/3] gtk: Allow to activate grab-on-hover from the command line Gerd Hoffmann
2014-03-17 13:39 ` [Qemu-devel] [PULL 2/3] gtk: Fix mouse warping with gtk3 Gerd Hoffmann
2014-03-17 13:39 ` Gerd Hoffmann [this message]
2014-03-17 16:15 ` [Qemu-devel] [PULL 0/3] gtk fixes Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2014-03-14 9:53 Gerd Hoffmann
2014-03-14 9:53 ` [Qemu-devel] [PULL 3/3] gtk: Don't warp absolute pointer Gerd Hoffmann
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=1395063588-27575-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=crobinso@redhat.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).