diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 746dbf1f..ea0b7d5c 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 | ||
36 | const 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 | |||
36 | static void notify_new_container(struct sway_container *container) { | 53 | static 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 | } |
@@ -144,7 +162,7 @@ struct sway_container *container_output_create( | |||
144 | struct sway_seat *seat = NULL; | 162 | struct sway_seat *seat = NULL; |
145 | wl_list_for_each(seat, &input_manager->seats, link) { | 163 | wl_list_for_each(seat, &input_manager->seats, link) { |
146 | if (!seat->has_focus) { | 164 | if (!seat->has_focus) { |
147 | sway_seat_set_focus(seat, ws); | 165 | seat_set_focus(seat, ws); |
148 | } | 166 | } |
149 | } | 167 | } |
150 | 168 | ||