From 1362061c4cefc558470c188d894f75faaa4e9cb2 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 22 Apr 2020 22:50:03 +0200 Subject: Implement floating views --- src/output.zig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/output.zig') diff --git a/src/output.zig b/src/output.zig index 9979870..a2b7de9 100644 --- a/src/output.zig +++ b/src/output.zig @@ -148,7 +148,12 @@ pub const Output = struct { const visible_count = blk: { var count: u32 = 0; var it = ViewStack(View).pendingIterator(self.views.first, output_tags); - while (it.next() != null) count += 1; + while (it.next()) |node| { + if (node.view.floating) { + continue; + } + count += 1; + } break :blk count; }; @@ -178,6 +183,9 @@ pub const Output = struct { var it = ViewStack(View).pendingIterator(self.views.first, output_tags); while (it.next()) |node| { const view = &node.view; + if (view.floating) { + continue; + } if (i < master_count) { // Add the remainder to the first master to ensure every pixel of height is used const master_height = @divTrunc(layout_height, master_count); -- cgit v1.2.3