From eab9c0901ab09040f362559d33e0391708c6db11 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 25 Jul 2021 22:17:40 +0200 Subject: [PATCH] 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); }