mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
move view and workspace destructors to container.c
This commit is contained in:
parent
7afbe9284f
commit
b4c5f79725
5 changed files with 83 additions and 62 deletions
|
|
@ -27,8 +27,7 @@ void view_destroy(struct sway_view *view) {
|
|||
view_unmap(view);
|
||||
}
|
||||
|
||||
container_view_destroy(view->swayc);
|
||||
free(view);
|
||||
container_destroy(view->swayc);
|
||||
}
|
||||
|
||||
const char *view_get_title(struct sway_view *view) {
|
||||
|
|
@ -78,14 +77,6 @@ void view_close(struct sway_view *view) {
|
|||
}
|
||||
}
|
||||
|
||||
void container_view_destroy(struct sway_container *view) {
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
wlr_log(L_DEBUG, "Destroying view '%s'", view->name);
|
||||
container_destroy(view);
|
||||
}
|
||||
|
||||
void view_damage_whole(struct sway_view *view) {
|
||||
for (int i = 0; i < root_container.children->length; ++i) {
|
||||
struct sway_container *cont = root_container.children->items[i];
|
||||
|
|
@ -158,7 +149,7 @@ void view_unmap(struct sway_view *view) {
|
|||
|
||||
view_damage_whole(view);
|
||||
|
||||
container_view_destroy(view->swayc);
|
||||
container_destroy(view->swayc);
|
||||
|
||||
view->swayc = NULL;
|
||||
view->surface = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue