Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
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;
}
}