Move common xdg/xwayland handle_destroy() code to view_destroy()

This commit is contained in:
Johan Malm 2023-02-24 21:45:03 +00:00 committed by Consolatis
parent ecbe699f94
commit 6819dcee78
3 changed files with 12 additions and 24 deletions

View file

@ -1019,6 +1019,16 @@ view_destroy(struct view *view)
struct server *server = view->server;
bool need_cursor_update = false;
wl_list_remove(&view->map.link);
wl_list_remove(&view->unmap.link);
wl_list_remove(&view->request_move.link);
wl_list_remove(&view->request_resize.link);
wl_list_remove(&view->request_minimize.link);
wl_list_remove(&view->request_maximize.link);
wl_list_remove(&view->request_fullscreen.link);
wl_list_remove(&view->set_title.link);
wl_list_remove(&view->destroy.link);
if (view->toplevel.handle) {
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
}