aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/tree/container.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index eaf4c117..753f333c 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -51,10 +51,16 @@ const char *container_type_to_str(enum sway_container_type type) {
51} 51}
52 52
53void container_create_notify(struct sway_container *container) { 53void container_create_notify(struct sway_container *container) {
54 // TODO send ipc event type based on the container type
54 wl_signal_emit(&root_container.sway_root->events.new_container, container); 55 wl_signal_emit(&root_container.sway_root->events.new_container, container);
55 ipc_event_window(container, "new"); 56 ipc_event_window(container, "new");
56} 57}
57 58
59static void container_close_notify(struct sway_container *container) {
60 // TODO send ipc event type based on the container type
61 ipc_event_window(container, "close");
62}
63
58struct sway_container *container_create(enum sway_container_type type) { 64struct sway_container *container_create(enum sway_container_type type) {
59 // next id starts at 1 because 0 is assigned to root_container in layout.c 65 // next id starts at 1 because 0 is assigned to root_container in layout.c
60 static size_t next_id = 1; 66 static size_t next_id = 1;
@@ -82,6 +88,7 @@ static void _container_destroy(struct sway_container *cont) {
82 } 88 }
83 89
84 wl_signal_emit(&cont->events.destroy, cont); 90 wl_signal_emit(&cont->events.destroy, cont);
91 container_close_notify(cont);
85 92
86 struct sway_container *parent = cont->parent; 93 struct sway_container *parent = cont->parent;
87 if (cont->children != NULL && cont->children->length) { 94 if (cont->children != NULL && cont->children->length) {