[PATCH weston] xwm: reset the surface and shsurf field on surface destruction
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 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] xwm: reset the surface and shsurf field on surface destruction
Ignore this one, i made a bit of mess with rebase. Sorry for the noise 2013/9/11 Giulio Camuffo giuliocamu...@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 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel