aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/layers.h44
-rw-r--r--include/sway/output.h19
-rw-r--r--include/sway/scene_descriptor.h1
-rw-r--r--include/sway/tree/root.h5
4 files changed, 19 insertions, 50 deletions
diff --git a/include/sway/layers.h b/include/sway/layers.h
index 9220bdb5..a7afb900 100644
--- a/include/sway/layers.h
+++ b/include/sway/layers.h
@@ -4,53 +4,30 @@
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_layer_shell_v1.h>
-enum layer_parent {
- LAYER_PARENT_LAYER,
- LAYER_PARENT_POPUP,
-};
-
struct sway_layer_surface {
- struct wlr_layer_surface_v1 *layer_surface;
- struct wl_list link;
-
- struct wl_listener destroy;
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener surface_commit;
struct wl_listener output_destroy;
+ struct wl_listener node_destroy;
struct wl_listener new_popup;
- struct wl_listener new_subsurface;
- struct wlr_box geo;
bool mapped;
- struct wlr_box extent;
- enum zwlr_layer_shell_v1_layer layer;
- struct wl_list subsurfaces;
+ struct sway_output *output;
+ struct wlr_scene_layer_surface_v1 *scene;
+ struct wlr_scene_tree *tree;
+ struct wlr_scene_tree *popups;
+ struct wlr_layer_surface_v1 *layer_surface;
};
struct sway_layer_popup {
struct wlr_xdg_popup *wlr_popup;
- enum layer_parent parent_type;
- union {
- struct sway_layer_surface *parent_layer;
- struct sway_layer_popup *parent_popup;
- };
- struct wl_listener map;
- struct wl_listener unmap;
- struct wl_listener destroy;
- struct wl_listener commit;
- struct wl_listener new_popup;
-};
-
-struct sway_layer_subsurface {
- struct wlr_subsurface *wlr_subsurface;
- struct sway_layer_surface *layer_surface;
- struct wl_list link;
+ struct wlr_scene_tree *scene;
+ struct sway_layer_surface *toplevel;
- struct wl_listener map;
- struct wl_listener unmap;
struct wl_listener destroy;
+ struct wl_listener new_popup;
struct wl_listener commit;
};
@@ -61,7 +38,4 @@ struct wlr_layer_surface_v1 *toplevel_layer_surface_from_surface(
void arrange_layers(struct sway_output *output);
-struct sway_layer_surface *layer_from_wlr_layer_surface_v1(
- struct wlr_layer_surface_v1 *layer_surface);
-
#endif
diff --git a/include/sway/output.h b/include/sway/output.h
index d353ce61..ea5d8f47 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -22,8 +22,12 @@ struct sway_output {
struct sway_node node;
struct {
+ struct wlr_scene_tree *shell_background;
+ struct wlr_scene_tree *shell_bottom;
struct wlr_scene_tree *tiling;
struct wlr_scene_tree *fullscreen;
+ struct wlr_scene_tree *shell_top;
+ struct wlr_scene_tree *shell_overlay;
struct wlr_scene_tree *session_lock;
} layers;
@@ -39,7 +43,6 @@ struct sway_output {
struct sway_server *server;
struct wl_list link;
- struct wl_list shell_layers[4]; // sway_layer_surface::link
struct wlr_box usable_area;
struct wlr_damage_ring damage_ring;
@@ -124,8 +127,6 @@ void output_enable(struct sway_output *output);
void output_disable(struct sway_output *output);
-bool output_has_opaque_overlay_layer_surface(struct sway_output *output);
-
struct sway_workspace *output_get_active_workspace(struct sway_output *output);
void output_surface_for_each_surface(struct sway_output *output,
@@ -140,18 +141,6 @@ void output_view_for_each_popup_surface(struct sway_output *output,
struct sway_view *view, sway_surface_iterator_func_t iterator,
void *user_data);
-void output_layer_for_each_surface(struct sway_output *output,
- struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,
- void *user_data);
-
-void output_layer_for_each_toplevel_surface(struct sway_output *output,
- struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,
- void *user_data);
-
-void output_layer_for_each_popup_surface(struct sway_output *output,
- struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,
- void *user_data);
-
#if HAVE_XWAYLAND
void output_unmanaged_for_each_surface(struct sway_output *output,
struct wl_list *unmanaged, sway_surface_iterator_func_t iterator,
diff --git a/include/sway/scene_descriptor.h b/include/sway/scene_descriptor.h
index 8af81219..970adaa5 100644
--- a/include/sway/scene_descriptor.h
+++ b/include/sway/scene_descriptor.h
@@ -15,6 +15,7 @@ enum sway_scene_descriptor_type {
SWAY_SCENE_DESC_NON_INTERACTIVE,
SWAY_SCENE_DESC_CONTAINER,
SWAY_SCENE_DESC_VIEW,
+ SWAY_SCENE_DESC_LAYER_SHELL,
SWAY_SCENE_DESC_DRAG_ICON,
};
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h
index 003606aa..2f717bae 100644
--- a/include/sway/tree/root.h
+++ b/include/sway/tree/root.h
@@ -40,10 +40,15 @@ struct sway_root {
struct wlr_scene_tree *layer_tree;
struct {
+ struct wlr_scene_tree *shell_background;
+ struct wlr_scene_tree *shell_bottom;
struct wlr_scene_tree *tiling;
struct wlr_scene_tree *floating;
+ struct wlr_scene_tree *shell_top;
struct wlr_scene_tree *fullscreen;
struct wlr_scene_tree *fullscreen_global;
+ struct wlr_scene_tree *shell_overlay;
+ struct wlr_scene_tree *popup;
struct wlr_scene_tree *seat;
struct wlr_scene_tree *session_lock;
} layers;