aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-31 21:21:26 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-02 11:12:18 -0400
commitb2d871cfe215a82266d01847f4787bbcf8c721c9 (patch)
tree87dbae47c65d56730c816d7e6e2123e5e851dec2 /sway/tree/container.c
parentMerge pull request #1684 from swaywm/follow-warp (diff)
downloadsway-b2d871cfe215a82266d01847f4787bbcf8c721c9.tar.gz
sway-b2d871cfe215a82266d01847f4787bbcf8c721c9.tar.zst
sway-b2d871cfe215a82266d01847f4787bbcf8c721c9.zip
Partially implement move command
Works: - move [container|window] to workspace <name> - Note, this should be able to move C_CONTAINER but this is untested - move [workspace] to output [left|right|up|down|<name>] Not implemented yet: - move [left|right|up|down] - move scratchpad - move position
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 746dbf1f..21fe3fb0 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -33,6 +33,23 @@ static list_t *get_bfs_queue() {
33 return bfs_queue; 33 return bfs_queue;
34} 34}
35 35
36const char *container_type_to_str(enum sway_container_type type) {
37 switch (type) {
38 case C_ROOT:
39 return "C_ROOT";
40 case C_OUTPUT:
41 return "C_OUTPUT";
42 case C_WORKSPACE:
43 return "C_WORKSPACE";
44 case C_CONTAINER:
45 return "C_CONTAINER";
46 case C_VIEW:
47 return "C_VIEW";
48 default:
49 return "C_UNKNOWN";
50 }
51}
52
36static void notify_new_container(struct sway_container *container) { 53static void notify_new_container(struct sway_container *container) {
37 wl_signal_emit(&root_container.sway_root->events.new_container, container); 54 wl_signal_emit(&root_container.sway_root->events.new_container, container);
38 ipc_event_window(container, "new"); 55 ipc_event_window(container, "new");
@@ -54,6 +71,7 @@ static struct sway_container *container_create(enum sway_container_type type) {
54 } 71 }
55 72
56 wl_signal_init(&c->events.destroy); 73 wl_signal_init(&c->events.destroy);
74 wl_signal_init(&c->events.reparent);
57 75
58 return c; 76 return c;
59} 77}