From 37a98e1a7aa5be7d6c5803161482be5e9951b931 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Fri, 19 Jun 2020 14:02:42 +0200 Subject: [PATCH] layout: fix loop counter The counter should not be incremented if the view was floating. --- river/Output.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/river/Output.zig b/river/Output.zig index 290530d..cf46230 100644 --- a/river/Output.zig +++ b/river/Output.zig @@ -302,10 +302,11 @@ fn layoutExternal(self: *Self, visible_count: u32, output_tags: u32) !void { // Apply window configuration to views var i: u32 = 0; var view_it = ViewStack(View).pendingIterator(self.views.first, output_tags); - while (view_it.next()) |node| : (i += 1) { + while (view_it.next()) |node| { const view = &node.view; if (view.floating) continue; view.pending_box = view_boxen.items[i]; + i += 1; } }