diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 36441fa60..e03ee701e 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -951,6 +951,7 @@ weston_wm_create_surface(struct wl_listener *listener, void *data) xserver_map_shell_surface(window, surface); window->surface_id = 0; wl_list_remove(&window->link); + wl_list_init(&window->link); break; } } @@ -1672,8 +1673,7 @@ weston_wm_window_destroy(struct weston_wm_window *window) if (window->frame) frame_destroy(window->frame); - if (window->surface_id) - wl_list_remove(&window->link); + wl_list_remove(&window->link); if (window->surface) wl_list_remove(&window->surface_destroy_listener.link);