diff options
author | Brian Ashworth <RedSoxFan@users.noreply.github.com> | 2018-08-26 21:59:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-26 21:59:38 -0400 |
commit | d6a5dfc913ba958d38af907ddb7acd7483a1cee7 (patch) | |
tree | 80b86b07b59056c9087817e92c42fab4821f38ae | |
parent | 6afc0590a1ad1b2d7f8276d34a607e8b61fbb6ca (diff) | |
parent | 6ae2e3a4a80df054cb6d5ad164a28a0094bced1d (diff) |
Merge pull request #2518 from ianyfan/ipc
Emit window close event earlier, before destroying
-rw-r--r-- | sway/tree/container.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index f13e2e96..58fd4898 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -42,14 +42,12 @@ 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); - if (container->type == C_VIEW) { ipc_event_window(container, "new"); } else if (container->type == C_WORKSPACE) { ipc_event_workspace(NULL, container, "init"); } + wl_signal_emit(&root_container.sway_root->events.new_container, container); } void container_update_textures_recursive(struct sway_container *con) { @@ -146,10 +144,10 @@ void container_begin_destroy(struct sway_container *con) { return; } - wl_signal_emit(&con->events.destroy, con); if (con->type == C_VIEW) { ipc_event_window(con, "close"); } + wl_signal_emit(&con->events.destroy, con); container_end_mouse_operation(con); |