From cc40126fefa27ab0cd995cdb6bd94808e1f5f314 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 27 Oct 2021 16:20:29 +0200 Subject: [PATCH] Drop cg_view_child This is now unused. --- view.c | 26 -------------------------- view.h | 12 ------------ 2 files changed, 38 deletions(-) diff --git a/view.c b/view.c index 26c3b7b..745f4e5 100644 --- a/view.c +++ b/view.c @@ -24,25 +24,6 @@ #include "xwayland.h" #endif -void -view_child_finish(struct cg_view_child *child) -{ - if (!child) { - return; - } - - wl_list_remove(&child->link); -} - -void -view_child_init(struct cg_view_child *child, struct cg_view *view, struct wlr_surface *wlr_surface) -{ - child->view = view; - child->wlr_surface = wlr_surface; - - wl_list_insert(&view->children, &child->link); -} - char * view_get_title(struct cg_view *view) { @@ -120,11 +101,6 @@ view_unmap(struct cg_view *view) { wl_list_remove(&view->link); - struct cg_view_child *child, *tmp; - wl_list_for_each_safe (child, tmp, &view->children, link) { - child->destroy(child); - } - wlr_scene_node_destroy(view->scene_node); view->wlr_surface = NULL; @@ -180,8 +156,6 @@ view_init(struct cg_view *view, struct cg_server *server, enum cg_view_type type view->server = server; view->type = type; view->impl = impl; - - wl_list_init(&view->children); } struct cg_view * diff --git a/view.h b/view.h index 67f2280..10a4e4a 100644 --- a/view.h +++ b/view.h @@ -24,7 +24,6 @@ enum cg_view_type { struct cg_view { struct cg_server *server; struct wl_list link; // server::views - struct wl_list children; // cg_view_child::link struct wlr_surface *wlr_surface; struct wlr_scene_node *scene_node; @@ -45,14 +44,6 @@ struct cg_view_impl { void (*destroy)(struct cg_view *view); }; -struct cg_view_child { - struct cg_view *view; - struct wlr_surface *wlr_surface; - struct wl_list link; - - void (*destroy)(struct cg_view_child *child); -}; - char *view_get_title(struct cg_view *view); bool view_is_primary(struct cg_view *view); bool view_is_transient_for(struct cg_view *child, struct cg_view *parent); @@ -65,7 +56,4 @@ void view_init(struct cg_view *view, struct cg_server *server, enum cg_view_type struct cg_view *view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface); -void view_child_finish(struct cg_view_child *child); -void view_child_init(struct cg_view_child *child, struct cg_view *view, struct wlr_surface *wlr_surface); - #endif