Implement floating views

This commit is contained in:
Isaac Freund
2020-04-22 22:50:03 +02:00
parent 94760394b4
commit 1362061c4c
6 changed files with 83 additions and 1 deletions

View File

@ -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);