aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2025-05-06 09:20:46 +0200
committerFurkan Sahin <furkan-dev@proton.me>2025-05-06 09:20:46 +0200
commit2347bbd94cf76a81fbf4cc921b4fd0181e395da5 (patch)
tree7451939869188f5bbb5990ffb96d25ef38a1cdd6 /include
parent73a9412a3bfbd27348a5c9215c2e7f2660c5747d (diff)
Drop sway_output.events.disable
In general wl_signal isn't well-suited for Sway: Sway doesn't need any modularity, and signals make it trickier to track down exactly what happens down the stack. Replace Sway's output disable signal with a simple list tracking for the only user.
Diffstat (limited to 'include')
-rw-r--r--include/sway/layers.h5
-rw-r--r--include/sway/output.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/include/sway/layers.h b/include/sway/layers.h
index fd6384e0..27b5dde1 100644
--- a/include/sway/layers.h
+++ b/include/sway/layers.h
@@ -9,7 +9,6 @@ struct sway_layer_surface {
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;
@@ -19,6 +18,8 @@ struct sway_layer_surface {
struct sway_popup_desc desc;
struct sway_output *output;
+ struct wl_list link; // sway_output.layer_surfaces
+
struct wlr_scene_layer_surface_v1 *scene;
struct wlr_scene_tree *tree;
struct wlr_layer_surface_v1 *layer_surface;
@@ -41,4 +42,6 @@ struct wlr_layer_surface_v1 *toplevel_layer_surface_from_surface(
void arrange_layers(struct sway_output *output);
+void destroy_layers(struct sway_output *output);
+
#endif
diff --git a/include/sway/output.h b/include/sway/output.h
index f6354e0e..756a0ec2 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -52,6 +52,7 @@ struct sway_output {
bool enabled;
list_t *workspaces;
+ struct wl_list layer_surfaces; // sway_layer_surface.link
struct sway_output_state current;
@@ -61,10 +62,6 @@ struct sway_output {
struct wl_listener frame;
struct wl_listener request_state;
- struct {
- struct wl_signal disable;
- } events;
-
struct wlr_color_transform *color_transform;
struct timespec last_presentation;