[PATCH weston] shell: clear popup grab interface on remove_popup_grab

Giulio Camuffo giuliocamuffo at gmail.com
Mon Apr 15 11:43:36 PDT 2013


Right, that was needed, thanks. I have a comment below, other than that it
looks good to me.


2013/4/15 Philipp Brüschweiler <blei42 at gmail.com>

> Fixes a segfault. Steps to reproduce:
>
> * start weston with the x11 backend
> * open a terminal
> * click on the icon in the top left corner, choose close
> * close the x11 window containing weston
> ---
>  src/shell.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/shell.c b/src/shell.c
> index de5d6f6..9083f59 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -1986,6 +1986,7 @@ popup_grab_end(struct wl_pointer *pointer)
>         if (pointer->grab->interface == &popup_grab_interface) {
>                 wl_pointer_end_grab(grab->pointer);
>                 shseat->popup_grab.client = NULL;
> +               assert(!wl_list_empty(&shseat->popup_grab.surfaces_list));
>

This should reset shseat->popup_grab.grab.interface too.


>                 /* Send the popup_done event to all the popups open */
>                 wl_list_for_each(shsurf,
> &shseat->popup_grab.surfaces_list, popup.grab_link) {
>
> wl_shell_surface_send_popup_done(&shsurf->resource);
> @@ -2028,6 +2029,7 @@ remove_popup_grab(struct shell_surface *shsurf)
>         wl_list_init(&shsurf->popup.grab_link);
>         if (wl_list_empty(&shseat->popup_grab.surfaces_list)) {
>                 wl_pointer_end_grab(shseat->popup_grab.grab.pointer);
> +               shseat->popup_grab.grab.interface = NULL;
>         }
>  }
>
> --
> 1.8.2.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130415/b2310037/attachment-0001.html>


More information about the wayland-devel mailing list