Commit e70a8ec6d58d
tarball3 files changed+12-4
@@ -651,12 +651,13 @@ impl Layout {
651651
merged652652
}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 over655
+ /// 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@@ -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 not330337
/// extended.331338
pub fn group_windows(&self, w: W, vis: impl Fn(W) -> bool) -> Vec<W> {@@ -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