atagen

monolith

public
Star0
Watch0

Commit e70a8ec6d58d

tarball

atagen <boss@atagen.co>2026-10-28 04:06 UTC

3 files changed+12-4
layout: draw the extended border on every window of an extended container

The border colour followed Tree::group, which only reaches a window whose own container is extended towards it, so the windows inside an extended container kept the plain colour.
Modified file: crates/layout/src/lib.rs+4 additions−3 deletions
@@ -651,12 +651,13 @@ impl Layout {
651651 merged
652652 }
653653
654- /// Whether a tiled window is extended over others sharing its container.
655- pub fn grouped(&self, w: WindowId) -> bool {
654+ /// Whether a tiled window, or a container holding it, is extended over
655+ /// others.
656+ pub fn extended(&self, w: WindowId) -> bool {
656657 let Some(o) = self.windows.get(w).and_then(|w| w.output) else {
657658 return false;
658659 };
659- self.outputs[o].tree.grouped(w, self.vis_on(o))
660+ self.outputs[o].tree.extended(w, self.vis_on(o))
660661 }
661662
662663 /// Whether another window is extended over the tiled window `w`, which
Modified file: crates/layout/src/tree.rs+7 additions
@@ -326,6 +326,13 @@ impl<W: Copy + Eq + Hash> Tree<W> {
326326 self.group(w, &vis).is_some()
327327 }
328328
329+ /// Whether `w`, or a container holding it, is extended over windows.
330+ pub fn extended(&self, w: W, vis: impl Fn(W) -> bool) -> bool {
331+ self.shown_path(w, &vis)
332+ .into_iter()
333+ .any(|(p, c)| self.expanded(p) == Some(c))
334+ }
335+
329336 /// The shown windows in the block `w` moves as, `w` alone when it is not
330337 /// extended.
331338 pub fn group_windows(&self, w: W, vis: impl Fn(W) -> bool) -> Vec<W> {
Modified file: crates/monolith/src/scene.rs+1 additions−1 deletions
@@ -185,7 +185,7 @@ pub fn build(
185185 clip_window(&mut out, first, clip);
186186 }
187187 if framed && deco.border > 0 {
188- let extended = layout.grouped(id);
188+ let extended = layout.extended(id);
189189 let color = if focused == Some(id) {
190190 if extended {
191191 deco.extended_focused.0