atagen

monolith

public
Star0
Watch0

Commit 6d227f43182f

tarball

atagen <boss@atagen.co>2026-10-19 08:41 UTC

1 file changed+3-1
layout: grow the first window from the output's far short edge

On an empty output every hidden window collapsed to a line down the middle, so the first window opened from the centre and the last one closed into it. Seeding on the far short edge, the right of a landscape output and the bottom of a portrait one, makes them slide in and out along the output's long axis.
Modified file: crates/layout/src/tree.rs+3 additions−1 deletions
@@ -576,8 +576,10 @@ impl<W: Copy + Eq + Hash> Tree<W> {
576576 if let Some(r) = self.root {
577577 let area = if self.visible(r, &vis) {
578578 area
579+ } else if area.w >= area.h {
580+ Rect::new(area.right(), area.y, 0.0, area.h)
579581 } else {
580- Rect::new(area.x + area.w / 2.0, area.y, 0.0, area.h)
582+ Rect::new(area.x, area.bottom(), area.w, 0.0)
581583 };
582584 self.place(r, area, gap, &vis, &mut out);
583585 }