diff options
| author | Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de> | 2020-05-20 15:57:07 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-20 23:02:28 +0200 |
| commit | fd3f48c1a7aea66943025de24eb4876c4ee022bb (patch) | |
| tree | 5736414a10032c350469cceaa2f81a34ca312958 /src/Output.zig | |
| parent | 444cf77ad377f0556d46e433f0cd13e0a82e74ab (diff) | |
| download | river-fd3f48c1a7aea66943025de24eb4876c4ee022bb.tar.gz river-fd3f48c1a7aea66943025de24eb4876c4ee022bb.tar.xz | |
Switch to layoutFull() for one or no visible views
Diffstat (limited to 'src/Output.zig')
| -rw-r--r-- | src/Output.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Output.zig b/src/Output.zig index e1ceb52..8135e9f 100644 --- a/src/Output.zig +++ b/src/Output.zig @@ -384,6 +384,16 @@ pub fn arrangeViews(self: *Self) void { break :blk count; }; + // A single view should always use the maximum available space. This is + // implemented via the "full" layout to remove the need of every single + // layout to explicitly handle this edge case or the other edge case of + // no visible views. + if (visible_count <= 1) { + layoutFull(self, visible_count, output_tags); + return; + } + + // TODO layout switching mechanism //layoutFull(self, visible_count, output_tags); //layoutTopMaster(self, visible_count, output_tags); //layoutRightMaster(self, visible_count, output_tags); |
