aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-10 11:11:47 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-10 11:11:47 -0500
commit21626e8153490bf155e812644454fe9610491ffd (patch)
tree5b881dcc23dfdae692f58aaf1a9677b5d1395f61 /sway/tree/container.c
parentMerge branch 'wlroots' into feature/input (diff)
downloadsway-21626e8153490bf155e812644454fe9610491ffd.tar.gz
sway-21626e8153490bf155e812644454fe9610491ffd.tar.zst
sway-21626e8153490bf155e812644454fe9610491ffd.zip
seat focus on button press
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 321ef8b1..78c8625f 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -40,6 +40,9 @@ static swayc_t *new_swayc(enum swayc_types type) {
40 if (type != C_VIEW) { 40 if (type != C_VIEW) {
41 c->children = create_list(); 41 c->children = create_list();
42 } 42 }
43
44 wl_signal_init(&c->events.destroy);
45
43 return c; 46 return c;
44} 47}
45 48
@@ -119,6 +122,9 @@ static void free_swayc(swayc_t *cont) {
119 if (!sway_assert(cont, "free_swayc passed NULL")) { 122 if (!sway_assert(cont, "free_swayc passed NULL")) {
120 return; 123 return;
121 } 124 }
125
126 wl_signal_emit(&cont->events.destroy, cont);
127
122 if (cont->children) { 128 if (cont->children) {
123 // remove children until there are no more, free_swayc calls 129 // remove children until there are no more, free_swayc calls
124 // remove_child, which removes child from this container 130 // remove_child, which removes child from this container