diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-02-27 20:17:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 20:17:08 -0500 |
commit | 8a97d3a4941f2f46021ff83b98d684676f53e8c1 (patch) | |
tree | c3d61812289a8de405c601f7657d371bbe378f89 /sway/tree | |
parent | 3c80498891a831b5cff356fd448efd62c77b031f (diff) | |
parent | 02804584e518fdf38e82eacedbe7606a87f004fc (diff) |
Merge pull request #1611 from acrisci/ipc-new-window
Ipc new window
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index fafbdb03..b424dd0a 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -15,6 +15,7 @@ #include "sway/server.h" #include "sway/view.h" #include "sway/workspace.h" +#include "sway/ipc-server.h" #include "log.h" static list_t *bfs_queue; @@ -32,6 +33,11 @@ static list_t *get_bfs_queue() { return bfs_queue; } +static void notify_new_container(swayc_t *container) { + wl_signal_emit(&root_container.sway_root->events.new_container, container); + ipc_event_window(container, "new"); +} + swayc_t *swayc_by_test(swayc_t *container, bool (*test)(swayc_t *view, void *data), void *data) { if (!container->children) { @@ -175,7 +181,7 @@ swayc_t *new_output(struct sway_output *sway_output) { } free(ws_name); - wl_signal_emit(&root_container.sway_root->events.new_container, output); + notify_new_container(output); return output; } @@ -197,7 +203,7 @@ swayc_t *new_workspace(swayc_t *output, const char *name) { add_child(output, workspace); sort_workspaces(output); - wl_signal_emit(&root_container.sway_root->events.new_container, workspace); + notify_new_container(workspace); return workspace; } @@ -222,7 +228,7 @@ swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view) { // Regular case, create as sibling of current container add_sibling(sibling, swayc); } - wl_signal_emit(&root_container.sway_root->events.new_container, swayc); + notify_new_container(swayc); return swayc; } |