feat(scrolling): make room for windows that will not get as narrow

Many apps will not make a window narrower than some width. The layout
placed the next column as if the window had the width it was given, and
so placed it on top of the window that had not.

What the arrival module has been told, the layout picks up at the start
of the next pass: a column is never narrower than the window in it
needs, plus the padding and border around it and capped at the width of
the screen, and the columns after it are placed where it ends. A limit
only ever goes up, so that a column does not bounce between two widths,
and a stack takes the widest of its windows.

With animations off the layout asks every window that it resized what
it is, with a timeout, and places everything once more if one refused.
With animations on the animator says so when a journey ends, so a
window that refuses is noticed then as well.
This commit is contained in:
LGUG2Z committed 2026-10-29 16:38:53 -07:00
1 parent b496bd8858
commit ebc9d49d77
3 files changed
+286 -6

No files matched your search

+8 -2
View File
@@ -91,6 +91,14 @@ so resizing a height does nothing.
[`scrolling-layout-columns`](../cli/scrolling-layout-columns.md) gives, on the focused workspace of each monitor. The
focused column stays where it is on screen, unless it has to scroll to stay in view.
## Windows with a minimum width
Many apps will not make a window narrower than some width, whatever they are asked. komorebi asks a window how wide it is
once it has been resized, and if it did not get as narrow as its column, the column becomes as wide as the window needs.
With [animations](animations.md) on that is when the window arrives, and with them off it is straight after the resize.
The columns after it move along to make room, and nothing overlaps. A column never gets narrower again because of this,
and never gets wider than the screen.
## Windows that are out of view
A window that scrolls out of view comes to rest at the edge of the screen that it left by, with 5 pixels of it still on
@@ -108,7 +116,5 @@ arranged above and below each other rather than side by side, none of this appli
These are not done yet.
- A window that will not get as narrow as its column, which is what many apps do, is not noticed, so it can overlap the
column next to it.
- Every window has a border, including the windows resting at the edges, so you may see a thin line of one at the edge
of the screen.