[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 7/7] gtk: Don't warp absolute pointer
From: |
Dave Airlie |
Subject: |
Re: [Qemu-devel] [PULL 7/7] gtk: Don't warp absolute pointer |
Date: |
Mon, 17 Mar 2014 14:12:33 +1000 |
On Thu, Mar 13, 2014 at 8:46 PM, Gerd Hoffmann <address@hidden> wrote:
> From: Cole Robinson <address@hidden>
Wierd I wrote and submitted these months ago, and they were promptly ignored,
Glad you had to find bugs all over again an reinvent the wheel,
Dave.
>
> 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 <address@hidden>
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
> ui/gtk.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 330dc13..ef7cb47 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
>
>
- [Qemu-devel] [PULL 0/7] gtk: cleanups and fixes, Gerd Hoffmann, 2014/03/13
- [Qemu-devel] [PULL 1/7] gtk: Allow to activate grab-on-hover from the command line, Gerd Hoffmann, 2014/03/13
- [Qemu-devel] [PULL 2/7] gtk: Don't use deprecated gtk_image_menu_item_new_with_mnemonic, Gerd Hoffmann, 2014/03/13
- [Qemu-devel] [PULL 3/7] gtk: Don't use deprecated vte_terminal_get_adjustment, Gerd Hoffmann, 2014/03/13
- [Qemu-devel] [PULL 6/7] gtk: Fix mouse warping with gtk3, Gerd Hoffmann, 2014/03/13
- [Qemu-devel] [PULL 5/7] gtk: Use ctrl+alt+q for quit accelerator, Gerd Hoffmann, 2014/03/13
- [Qemu-devel] [PULL 4/7] gtk: Remove use of deprecated stock items, Gerd Hoffmann, 2014/03/13
- [Qemu-devel] [PULL 7/7] gtk: Don't warp absolute pointer, Gerd Hoffmann, 2014/03/13
- Re: [Qemu-devel] [PULL 7/7] gtk: Don't warp absolute pointer,
Dave Airlie <=
- Re: [Qemu-devel] [PULL 0/7] gtk: cleanups and fixes, Peter Maydell, 2014/03/13