aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-04 14:49:48 -0400
committerGitHub <noreply@github.com>2018-04-04 14:49:48 -0400
commit3852a710ca62a76f4fd9c6ff9d28e7e5d5fcf78d (patch)
treeca9d404396536bdeea7adee90a50c8a82a6164ef
parentdee71871d7a37cfa1e53f3f1f60e6e93d21beda4 (diff)
parent76b0f3531f218551535f489f3bb51cdf38b937d6 (diff)
Merge pull request #1731 from acrisci/ipc-window-events
ipc window and workspace events
-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) {
}
void container_create_notify(struct sway_container *container) {
+ // TODO send ipc event type based on the container type
wl_signal_emit(&root_container.sway_root->events.new_container, container);
ipc_event_window(container, "new");
}
+static void container_close_notify(struct sway_container *container) {
+ // TODO send ipc event type based on the container type
+ ipc_event_window(container, "close");
+}
+
struct sway_container *container_create(enum sway_container_type type) {
// next id starts at 1 because 0 is assigned to root_container in layout.c
static size_t next_id = 1;
@@ -82,6 +88,7 @@ static void _container_destroy(struct sway_container *cont) {
}
wl_signal_emit(&cont->events.destroy, cont);
+ container_close_notify(cont);
struct sway_container *parent = cont->parent;
if (cont->children != NULL && cont->children->length) {