From c048abc8b50dc7fa79c117518d510059717aa356 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 26 Dec 2023 10:29:00 +0400 Subject: layout: Add Column::position --- src/layout/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 0514e12c..79c7cd19 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -518,7 +518,7 @@ impl Layout { for mon in monitors { for ws in &mon.workspaces { for col in &ws.columns { - if let Some(idx) = col.windows.iter().position(|w| w == window) { + if let Some(idx) = col.position(window) { return Some(col.window_y(idx)); } } @@ -528,7 +528,7 @@ impl Layout { MonitorSet::NoOutputs { workspaces, .. } => { for ws in workspaces { for col in &ws.columns { - if let Some(idx) = col.windows.iter().position(|w| w == window) { + if let Some(idx) = col.position(window) { return Some(col.window_y(idx)); } } -- cgit