git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitb10ec8c5284e06afb23ec6b7430a6fe692872767
parent3d02fbd5c1
authorIsaac Freund <[email protected]>
date2026-02-10 10:15
layer-shell: ensure non_exclusive_area sent on x/y change

Currently we only recalculate/resend the non_exclusive_area when
output width or height changes. If only the position is changed,
we fail to send the correct new non_exclusive_area to the wm.

 river/LayerShellOutput.zig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/river/LayerShellOutput.zig b/river/LayerShellOutput.zig
index 2e5ad05..590a221 100644
--- a/river/LayerShellOutput.zig
+++ b/river/LayerShellOutput.zig
@@ -155,11 +155,11 @@ pub fn manageStart(shell_output: *LayerShellOutput) void {
     const output: *Output = @fieldParentPtr("layer_shell", shell_output);
     assert(output.scheduled.state == .enabled or output.scheduled.state == .disabled_soft);
 
-    const scheduled_width, const scheduled_height = output.scheduled.dimensions();
-    const sent_width, const sent_height = output.sent.dimensions();
+    const scheduled_box = output.scheduled.box();
+    const sent_box = output.sent.box();
 
-    if (scheduled_width != sent_width or scheduled_height != sent_height) {
-        shell_output.scheduled.non_exclusive_area = output.scheduled.box();
+    if (!std.meta.eql(scheduled_box, sent_box)) {
+        shell_output.scheduled.non_exclusive_area = scheduled_box;
         sendConfigures(output, .exclusive);
         sendConfigures(output, .non_exclusive);
     }