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

commit9d1b39e76ae2a00aa56ad87ef0be1605222253f2
parent37d41dad8b
authorIsaac Freund <[email protected]>
date2021-07-25 22:17
layout: assert output state matches layout applied

This is guaranteed to already be set to the layout being committed. It
is set either when a client binds a new layout object or when the user
changes the layout namespace in use.

 river/LayoutDemand.zig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/river/LayoutDemand.zig b/river/LayoutDemand.zig
index 41f4a94..a14fcbe 100644
--- a/river/LayoutDemand.zig
+++ b/river/LayoutDemand.zig
@@ -18,6 +18,7 @@
 const Self = @This();
 
 const std = @import("std");
+const assert = std.debug.assert;
 const mem = std.mem;
 const wlr = @import("wlroots");
 const wayland = @import("wayland");
@@ -135,6 +136,6 @@ pub fn apply(self: *Self, layout: *Layout) void {
         }
         view.applyConstraints();
     }
-    std.debug.assert(i == self.view_boxen.len);
-    output.pending.layout = layout;
+    assert(i == self.view_boxen.len);
+    assert(output.pending.layout == layout);
 }