diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-03 23:06:01 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-04 14:01:20 +1000 |
commit | 04489ff4209dc073027419d90961367cfb998fe8 (patch) | |
tree | d6f6213d2374e10a875e8ced872511e6e656ae3e /include/sway/tree/layout.h | |
parent | Merge pull request #2419 from RedSoxFan/fix-2416 (diff) | |
download | sway-04489ff4209dc073027419d90961367cfb998fe8.tar.gz sway-04489ff4209dc073027419d90961367cfb998fe8.tar.zst sway-04489ff4209dc073027419d90961367cfb998fe8.zip |
Separate root-related code
This creates a root.c and moves bits and pieces from elsewhere into it.
* layout_init has been renamed to root_create and moved into root.c
* root_destroy has been created and is called on shutdown
* scratchpad code has been moved into root.c, because hidden scratchpad
containers are stored in the root struct
Diffstat (limited to 'include/sway/tree/layout.h')
-rw-r--r-- | include/sway/tree/layout.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index a4c31bf6..77cd954b 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <wlr/types/wlr_output_layout.h> | 3 | #include <wlr/types/wlr_output_layout.h> |
4 | #include <wlr/render/wlr_texture.h> | 4 | #include <wlr/render/wlr_texture.h> |
5 | #include "sway/tree/container.h" | 5 | #include "sway/tree/container.h" |
6 | #include "sway/tree/root.h" | ||
6 | #include "config.h" | 7 | #include "config.h" |
7 | 8 | ||
8 | enum movement_direction { | 9 | enum movement_direction { |
@@ -24,28 +25,6 @@ enum resize_edge { | |||
24 | 25 | ||
25 | struct sway_container; | 26 | struct sway_container; |
26 | 27 | ||
27 | struct sway_root { | ||
28 | struct wlr_output_layout *output_layout; | ||
29 | |||
30 | struct wl_listener output_layout_change; | ||
31 | #ifdef HAVE_XWAYLAND | ||
32 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link | ||
33 | #endif | ||
34 | struct wl_list drag_icons; // sway_drag_icon::link | ||
35 | |||
36 | struct wlr_texture *debug_tree; | ||
37 | |||
38 | struct wl_list outputs; // sway_output::link | ||
39 | |||
40 | list_t *scratchpad; // struct sway_container | ||
41 | |||
42 | struct { | ||
43 | struct wl_signal new_container; | ||
44 | } events; | ||
45 | }; | ||
46 | |||
47 | void layout_init(void); | ||
48 | |||
49 | void container_add_child(struct sway_container *parent, | 28 | void container_add_child(struct sway_container *parent, |
50 | struct sway_container *child); | 29 | struct sway_container *child); |
51 | 30 | ||