diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2011-12-27 22:47:51 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-12-27 22:47:51 -0500 |
commit | facb5584486e48202eaeffa54581ceac0132ae42 (patch) | |
tree | 6f1e0d3fe020f840967af0de6733b22009066f0b /compositor | |
parent | a42c128201f8b0062696d4c4b1ef64b6da3cae0b (diff) |
x11: Remove destroy listener when X11 window is destroyed
Diffstat (limited to 'compositor')
-rw-r--r-- | compositor/xserver-launcher.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compositor/xserver-launcher.c b/compositor/xserver-launcher.c index 9c5b2273..1812472c 100644 --- a/compositor/xserver-launcher.c +++ b/compositor/xserver-launcher.c @@ -691,6 +691,7 @@ wlsc_wm_handle_create_notify(struct wlsc_wm *wm, xcb_generic_event_t *event) return; } + memset(window, 0, sizeof *window); window->id = create_notify->window; hash_table_insert(wm->window_hash, window->id, window); } @@ -714,6 +715,8 @@ wlsc_wm_handle_destroy_notify(struct wlsc_wm *wm, xcb_generic_event_t *event) fprintf(stderr, "destroy window %p\n", window); hash_table_remove(wm->window_hash, window->id); + if (window->surface) + wl_list_remove(&window->surface_destroy_listener.link); free(window); } |