aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-03 16:35:06 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-09 10:08:43 +1000
commit59c94887018bdfa578c4371c4275061ca6e71b3e (patch)
tree62bdaa6ac4777d1fcb292013bddd2043dad7765a /sway/tree/container.c
parentMerge pull request #2115 from RedSoxFan/restore-workspaces (diff)
downloadsway-59c94887018bdfa578c4371c4275061ca6e71b3e.tar.gz
sway-59c94887018bdfa578c4371c4275061ca6e71b3e.tar.zst
sway-59c94887018bdfa578c4371c4275061ca6e71b3e.zip
WIP: Atomic layout updates ground work
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index cd2c083c..e6956f5c 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -116,6 +116,7 @@ struct sway_container *container_create(enum sway_container_type type) {
116 116
117 if (type != C_VIEW) { 117 if (type != C_VIEW) {
118 c->children = create_list(); 118 c->children = create_list();
119 //c->pending.children = create_list();
119 } 120 }
120 121
121 wl_signal_init(&c->events.destroy); 122 wl_signal_init(&c->events.destroy);
@@ -162,6 +163,7 @@ static void _container_destroy(struct sway_container *cont) {
162 wlr_texture_destroy(cont->title_urgent); 163 wlr_texture_destroy(cont->title_urgent);
163 164
164 list_free(cont->children); 165 list_free(cont->children);
166 //list_free(cont->pending.children);
165 cont->children = NULL; 167 cont->children = NULL;
166 free(cont); 168 free(cont);
167} 169}
@@ -971,3 +973,12 @@ bool container_is_floating(struct sway_container *container) {
971 } 973 }
972 return container->parent == workspace->sway_workspace->floating; 974 return container->parent == workspace->sway_workspace->floating;
973} 975}
976
977struct wlr_box *container_get_box(struct sway_container *container) {
978 struct wlr_box *box = calloc(1, sizeof(struct wlr_box));
979 box->x = container->x;
980 box->y = container->y;
981 box->width = container->width;
982 box->height = container->height;
983 return box;
984}