diff options
author | emersion <[email protected]> | 2018-08-04 20:41:45 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2018-08-04 20:41:45 +0100 |
commit | 0016f774407cdb96e6fe3b1b9235119d9b398f8b (patch) | |
tree | bc82fb73e33446c5ec0b50c1bae73658e3eeb6b4 /sway/tree/layout.c | |
parent | 5de2223c6df480759ee6d8f4422c2643491595d0 (diff) | |
parent | 30e7e0f7c7d3d3ce2851f2e70842d735343fb402 (diff) |
Merge pull request #2418 from RyanDwyer/separate-root
Separate root-related code
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 @@ #include "list.h" #include "log.h" -struct sway_container root_container; - -static void output_layout_handle_change(struct wl_listener *listener, - void *data) { - arrange_windows(&root_container); - transaction_commit_dirty(); -} - -void layout_init(void) { - root_container.id = 0; // normally assigned in new_swayc() - root_container.type = C_ROOT; - root_container.layout = L_NONE; - root_container.name = strdup("root"); - root_container.instructions = create_list(); - root_container.children = create_list(); - root_container.current.children = create_list(); - wl_signal_init(&root_container.events.destroy); - - root_container.sway_root = calloc(1, sizeof(*root_container.sway_root)); - root_container.sway_root->output_layout = wlr_output_layout_create(); - wl_list_init(&root_container.sway_root->outputs); -#ifdef HAVE_XWAYLAND - wl_list_init(&root_container.sway_root->xwayland_unmanaged); -#endif - wl_list_init(&root_container.sway_root->drag_icons); - wl_signal_init(&root_container.sway_root->events.new_container); - root_container.sway_root->scratchpad = create_list(); - - root_container.sway_root->output_layout_change.notify = - output_layout_handle_change; - wl_signal_add(&root_container.sway_root->output_layout->events.change, - &root_container.sway_root->output_layout_change); -} - static int index_child(const struct sway_container *child) { struct sway_container *parent = child->parent; for (int i = 0; i < parent->children->length; ++i) { |