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.
This commit is contained in:
Kristian Høgsberg 2013-09-03 16:15:42 -07:00
parent 1a7a57f0d9
commit 81cadc725c
1 changed files with 2 additions and 0 deletions

View File

@ -1847,6 +1847,8 @@ surface_destroy(struct wl_listener *listener, void *data)
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 *