[PATCH weston] shell: End grab if the grabbed shell surface has been destroyed
Kristian Høgsberg
hoegsberg at gmail.com
Mon May 20 13:54:40 PDT 2013
On Mon, May 20, 2013 at 12:09:20PM +0100, Rob Bradford wrote:
> From: Rob Bradford <rob at linux.intel.com>
>
> The shell_grab_start function sets up a destroy notification on the
> shell surface such that when the shell surface is destroyed the pointer
> on the grab to the shell surface is set to NULL.
>
> We must therefore check whether the shell surface is NULL and end the
> grab if it is.
Thanks Rob, I think that was indeed the problem I introduced with the
input rewrite.
Kristian
> https://bugs.freedesktop.org/show_bug.cgi?id=64689
> ---
> src/shell.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/shell.c b/src/shell.c
> index f5d5bff..7261570 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -1296,7 +1296,7 @@ busy_cursor_grab_focus(struct weston_pointer_grab *base)
> pointer->x, pointer->y,
> &sx, &sy);
>
> - if (grab->shsurf->surface != surface) {
> + if (!grab->shsurf || grab->shsurf->surface != surface) {
> shell_grab_end(grab);
> free(grab);
> }
> --
> 1.8.1.4
>
> _______________________________________________
> 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