[PATCH weston] xwm: reset the surface and shsurf field on surface destruction
Giulio Camuffo
giuliocamuffo at gmail.com
Wed Sep 11 09:19:40 PDT 2013
Ignore this one, i made a bit of mess with rebase.
Sorry for the noise
2013/9/11 Giulio Camuffo <giuliocamuffo at gmail.com>
> we may still get events from x, so by setting those fields to NULL
> we make sure we don't try to use destroyed objects.
> ---
> src/xwayland/window-manager.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
> index e1f26f6..912553e 100644
> --- a/src/xwayland/window-manager.c
> +++ b/src/xwayland/window-manager.c
> @@ -1878,6 +1878,9 @@ surface_destroy(struct wl_listener *listener, void
> *data)
> container_of(listener,
> struct weston_wm_window,
> surface_destroy_listener);
>
> + window->surface = NULL;
> + /* This should have been freed by the shell */
> + window->shsurf = NULL;
> wm_log("surface for xid %d destroyed\n", window->id);
>
> window->surface = NULL;
> --
> 1.8.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130911/e850b5a1/attachment.html>
More information about the wayland-devel
mailing list