diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-26 10:29:00 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-26 10:29:00 +0400 |
| commit | c048abc8b50dc7fa79c117518d510059717aa356 (patch) | |
| tree | 7ebcd1183566fe58215871e1409bc6be208cbc0f /src/layout/mod.rs | |
| parent | 4dd7578fe7c55e4b3154b212d757632d173c76c2 (diff) | |
| download | niri-c048abc8b50dc7fa79c117518d510059717aa356.tar.gz niri-c048abc8b50dc7fa79c117518d510059717aa356.tar.bz2 niri-c048abc8b50dc7fa79c117518d510059717aa356.zip | |
layout: Add Column::position
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<W: LayoutElement> Layout<W> { 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<W: LayoutElement> Layout<W> { 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)); } } |
