xwm: Set window->surface to NULL when surface goes away
Otherwise we may end up trying to remove the destroy listener if we
get the surface_destroy callback before the unmap_notify.
diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 5258197..c6c7bd5 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -1847,6 +1847,8 @@
struct weston_wm_window, surface_destroy_listener);
wm_log("surface for xid %d destroyed\n", window->id);
+
+ window->surface = NULL;
}
static struct weston_wm_window *