diff options
Diffstat (limited to 'include/sway/tree/root.h')
-rw-r--r-- | include/sway/tree/root.h | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h index 5d4a2f2d..15df0f55 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <wayland-server-core.h> | 3 | #include <wayland-server-core.h> |
4 | #include <wayland-util.h> | 4 | #include <wayland-util.h> |
5 | #include <wlr/types/wlr_output_layout.h> | 5 | #include <wlr/types/wlr_output_layout.h> |
6 | #include <wlr/types/wlr_scene.h> | ||
6 | #include <wlr/render/wlr_texture.h> | 7 | #include <wlr/render/wlr_texture.h> |
7 | #include "sway/tree/container.h" | 8 | #include "sway/tree/container.h" |
8 | #include "sway/tree/node.h" | 9 | #include "sway/tree/node.h" |
@@ -16,10 +17,44 @@ struct sway_root { | |||
16 | struct wlr_output_layout *output_layout; | 17 | struct wlr_output_layout *output_layout; |
17 | 18 | ||
18 | struct wl_listener output_layout_change; | 19 | struct wl_listener output_layout_change; |
20 | |||
21 | // scene node layout: | ||
22 | // - root | ||
23 | // - staging | ||
24 | // - layer shell stuff | ||
25 | // - tiling | ||
26 | // - floating | ||
27 | // - fullscreen stuff | ||
28 | // - seat stuff | ||
29 | // - ext_session_lock | ||
30 | struct wlr_scene *root_scene; | ||
31 | |||
32 | // since wlr_scene nodes can't be orphaned and must always | ||
33 | // have a parent, use this staging scene_tree so that a | ||
34 | // node always have a valid parent. Nothing in this | ||
35 | // staging node will be visible. | ||
36 | struct wlr_scene_tree *staging; | ||
37 | |||
38 | // tree containing all layers the compositor will render. Cursor handling | ||
39 | // will end up iterating this tree. | ||
40 | struct wlr_scene_tree *layer_tree; | ||
41 | |||
42 | struct { | ||
43 | struct wlr_scene_tree *shell_background; | ||
44 | struct wlr_scene_tree *shell_bottom; | ||
45 | struct wlr_scene_tree *tiling; | ||
46 | struct wlr_scene_tree *floating; | ||
47 | struct wlr_scene_tree *shell_top; | ||
48 | struct wlr_scene_tree *fullscreen; | ||
49 | struct wlr_scene_tree *fullscreen_global; | ||
19 | #if HAVE_XWAYLAND | 50 | #if HAVE_XWAYLAND |
20 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link | 51 | struct wlr_scene_tree *unmanaged; |
21 | #endif | 52 | #endif |
22 | struct wl_list drag_icons; // sway_drag_icon::link | 53 | struct wlr_scene_tree *shell_overlay; |
54 | struct wlr_scene_tree *popup; | ||
55 | struct wlr_scene_tree *seat; | ||
56 | struct wlr_scene_tree *session_lock; | ||
57 | } layers; | ||
23 | 58 | ||
24 | // Includes disabled outputs | 59 | // Includes disabled outputs |
25 | struct wl_list all_outputs; // sway_output::link | 60 | struct wl_list all_outputs; // sway_output::link |
@@ -28,6 +63,7 @@ struct sway_root { | |||
28 | double width, height; | 63 | double width, height; |
29 | 64 | ||
30 | list_t *outputs; // struct sway_output | 65 | list_t *outputs; // struct sway_output |
66 | list_t *non_desktop_outputs; // struct sway_output_non_desktop | ||
31 | list_t *scratchpad; // struct sway_container | 67 | list_t *scratchpad; // struct sway_container |
32 | 68 | ||
33 | // For when there's no connected outputs | 69 | // For when there's no connected outputs |
@@ -40,7 +76,7 @@ struct sway_root { | |||
40 | } events; | 76 | } events; |
41 | }; | 77 | }; |
42 | 78 | ||
43 | struct sway_root *root_create(void); | 79 | struct sway_root *root_create(struct wl_display *display); |
44 | 80 | ||
45 | void root_destroy(struct sway_root *root); | 81 | void root_destroy(struct sway_root *root); |
46 | 82 | ||
@@ -68,12 +104,6 @@ void root_scratchpad_show(struct sway_container *con); | |||
68 | */ | 104 | */ |
69 | void root_scratchpad_hide(struct sway_container *con); | 105 | void root_scratchpad_hide(struct sway_container *con); |
70 | 106 | ||
71 | struct sway_workspace *root_workspace_for_pid(pid_t pid); | ||
72 | |||
73 | void root_record_workspace_pid(pid_t pid); | ||
74 | |||
75 | void root_remove_workspace_pid(pid_t pid); | ||
76 | |||
77 | void root_for_each_workspace(void (*f)(struct sway_workspace *ws, void *data), | 107 | void root_for_each_workspace(void (*f)(struct sway_workspace *ws, void *data), |
78 | void *data); | 108 | void *data); |
79 | 109 | ||
@@ -91,6 +121,4 @@ struct sway_container *root_find_container( | |||
91 | 121 | ||
92 | void root_get_box(struct sway_root *root, struct wlr_box *box); | 122 | void root_get_box(struct sway_root *root, struct wlr_box *box); |
93 | 123 | ||
94 | void root_rename_pid_workspaces(const char *old_name, const char *new_name); | ||
95 | |||
96 | #endif | 124 | #endif |