mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
view: Refactor view destruction some more
This commit is contained in:
parent
0ec63a153b
commit
73930f7e0f
4 changed files with 35 additions and 30 deletions
11
src/xdg.c
11
src/xdg.c
|
|
@ -78,7 +78,16 @@ static void
|
|||
handle_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct view *view = wl_container_of(listener, view, destroy);
|
||||
view_handle_destroy(view);
|
||||
assert(view->type == LAB_XDG_SHELL_VIEW);
|
||||
|
||||
/* Reset XDG specific surface for good measure */
|
||||
view->xdg_surface = NULL;
|
||||
|
||||
/* Remove XDG specific handlers */
|
||||
wl_list_remove(&view->destroy.link);
|
||||
|
||||
/* And finally destroy / free the view */
|
||||
view_destroy(view);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue