summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2023-12-06 15:47:24 -0500
committerFurkan Sahin <furkan-dev@proton.me>2023-12-06 15:47:24 -0500
commit9abb70ae1b4fb6ecd2dfcc2dea3fafaea1f29b70 (patch)
tree66c3384d0a5a57c3a3e66bdc63ecb1c8b414747a /include
parent9315ded7cbe1e87835f67d1c8c70b0e7c571277c (diff)
output: Destroy when output layout is destroyed
Since output layout is destroyed when the wayland display is destroyed we run into a destroy listener order problem: Either the display starts destroying the outputs first, in which case we're good: The existing handling will clean up. However, things go wrong if the display decides to destroy the output layout first. In this case, sway will hold invalid references to the output layout as part of each output so that when it finally goes to destroy them, sway will dereference destroyed output layout bits. Ref: https://github.com/swaywm/sway/pull/6844#issuecomment-1843599513 (cherry picked from commit bbabb9aae8d7b7771d02489b6f20301cf1c090c9)
Diffstat (limited to 'include')
-rw-r--r--include/sway/output.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/output.h b/include/sway/output.h
index 62d866bc..43cbccd2 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -39,6 +39,7 @@ struct sway_output {
struct sway_output_state current;
+ struct wl_listener layout_destroy;
struct wl_listener destroy;
struct wl_listener commit;
struct wl_listener present;