aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-10 11:11:47 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-10 11:11:47 -0500
commit21626e8153490bf155e812644454fe9610491ffd (patch)
tree5b881dcc23dfdae692f58aaf1a9677b5d1395f61 /sway/tree
parent0fdecb4d3a36d4c73a906bcc0465620293b6e6d2 (diff)
seat focus on button press
Diffstat (limited to 'sway/tree')
-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) {
if (type != C_VIEW) {
c->children = create_list();
}
+
+ wl_signal_init(&c->events.destroy);
+
return c;
}
@@ -119,6 +122,9 @@ static void free_swayc(swayc_t *cont) {
if (!sway_assert(cont, "free_swayc passed NULL")) {
return;
}
+
+ wl_signal_emit(&cont->events.destroy, cont);
+
if (cont->children) {
// remove children until there are no more, free_swayc calls
// remove_child, which removes child from this container