[Spice-devel] [PATCH spice-gtk 10/11] Ignore the first mouse click when taking the grab

Hans de Goede hdegoede at redhat.com
Thu Dec 8 07:31:54 PST 2011


ACK.

On 12/08/2011 03:12 PM, Marc-André Lureau wrote:
> ---
>   gtk/spice-widget.c |   16 ++++++++++------
>   1 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index 1fa54c3..08aa5a9 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -1144,12 +1144,16 @@ static gboolean button_event(GtkWidget *widget, GdkEventButton *button)
>       }
>
>       gtk_widget_grab_focus(widget);
> -    if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER)
> -        try_mouse_grab(display);
> -    else /* allow to drag and drop between windows/displays:
> -            FIXME: should be multiple widget grab, but how?
> -            or should now the position of the other widgets?..
> -         */
> +    if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER) {
> +        if (!d->mouse_grab_active) {
> +            try_mouse_grab(display);
> +            return true;
> +        }
> +    } else
> +        /* allow to drag and drop between windows/displays:
> +           FIXME: should be multiple widget grab, but how?
> +           or should now the position of the other widgets?..
> +        */
>           gdk_pointer_ungrab(GDK_CURRENT_TIME);
>
>       if (!d->inputs)


More information about the Spice-devel mailing list