diff options
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 1f82e534..07de9664 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -19,40 +19,6 @@ | |||
19 | #include "list.h" | 19 | #include "list.h" |
20 | #include "log.h" | 20 | #include "log.h" |
21 | 21 | ||
22 | struct sway_container root_container; | ||
23 | |||
24 | static void output_layout_handle_change(struct wl_listener *listener, | ||
25 | void *data) { | ||
26 | arrange_windows(&root_container); | ||
27 | transaction_commit_dirty(); | ||
28 | } | ||
29 | |||
30 | void layout_init(void) { | ||
31 | root_container.id = 0; // normally assigned in new_swayc() | ||
32 | root_container.type = C_ROOT; | ||
33 | root_container.layout = L_NONE; | ||
34 | root_container.name = strdup("root"); | ||
35 | root_container.instructions = create_list(); | ||
36 | root_container.children = create_list(); | ||
37 | root_container.current.children = create_list(); | ||
38 | wl_signal_init(&root_container.events.destroy); | ||
39 | |||
40 | root_container.sway_root = calloc(1, sizeof(*root_container.sway_root)); | ||
41 | root_container.sway_root->output_layout = wlr_output_layout_create(); | ||
42 | wl_list_init(&root_container.sway_root->outputs); | ||
43 | #ifdef HAVE_XWAYLAND | ||
44 | wl_list_init(&root_container.sway_root->xwayland_unmanaged); | ||
45 | #endif | ||
46 | wl_list_init(&root_container.sway_root->drag_icons); | ||
47 | wl_signal_init(&root_container.sway_root->events.new_container); | ||
48 | root_container.sway_root->scratchpad = create_list(); | ||
49 | |||
50 | root_container.sway_root->output_layout_change.notify = | ||
51 | output_layout_handle_change; | ||
52 | wl_signal_add(&root_container.sway_root->output_layout->events.change, | ||
53 | &root_container.sway_root->output_layout_change); | ||
54 | } | ||
55 | |||
56 | static int index_child(const struct sway_container *child) { | 22 | static int index_child(const struct sway_container *child) { |
57 | struct sway_container *parent = child->parent; | 23 | struct sway_container *parent = child->parent; |
58 | for (int i = 0; i < parent->children->length; ++i) { | 24 | for (int i = 0; i < parent->children->length; ++i) { |