[PATCH] exposay: provide a cancel func to the ptr grab iface

Kristian Høgsberg hoegsberg at gmail.com
Wed Nov 27 14:09:22 PST 2013


On Tue, Nov 26, 2013 at 01:32:08PM +0100, pochu27 at gmail.com wrote:
> From: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>
> 
> Fixes a crash when cancel is called while exposay is in progress.

Yup, I was hitting that a lot, thanks.

Kristian

> ---
>  src/shell.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/shell.c b/src/shell.c
> index f102e9a..6ba1f10 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -5275,10 +5275,20 @@ exposay_button(struct weston_pointer_grab *grab, uint32_t time, uint32_t button,
>  		shell->exposay.clicked = NULL;
>  }
>  
> +static void
> +exposay_pointer_grab_cancel(struct weston_pointer_grab *grab)
> +{
> +	struct desktop_shell *shell =
> +		container_of(grab, struct desktop_shell, exposay.grab_ptr);
> +
> +	exposay_set_state(shell, EXPOSAY_TARGET_CANCEL, shell->exposay.seat);
> +}
> +
>  static const struct weston_pointer_grab_interface exposay_ptr_grab = {
>  	noop_grab_focus,
>  	exposay_motion,
>  	exposay_button,
> +	exposay_pointer_grab_cancel,
>  };
>  
>  static int
> -- 
> 1.8.4.rc3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list