From 5f402210510aff0051abd080d664581c26e77c2b Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 14 May 2024 15:00:11 +0400 Subject: Refactor column and tile offsets, fix a few issues --- src/layout/mod.rs | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 1442dfd0..88b9b3ec 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -745,14 +745,14 @@ impl Layout { None } - pub fn window_y(&self, window: &W::Id) -> Option { + pub fn window_loc(&self, window: &W::Id) -> Option> { match &self.monitor_set { MonitorSet::Normal { monitors, .. } => { for mon in monitors { for ws in &mon.workspaces { for col in &ws.columns { if let Some(idx) = col.position(window) { - return Some(col.window_y(idx)); + return Some(col.window_loc(idx)); } } } @@ -762,7 +762,7 @@ impl Layout { for ws in workspaces { for col in &ws.columns { if let Some(idx) = col.position(window) { - return Some(col.window_y(idx)); + return Some(col.window_loc(idx)); } } } @@ -1995,31 +1995,6 @@ impl Layout { } } - pub fn prepare_for_resize_animation(&mut self, window: &W::Id) { - let _span = tracy_client::span!("Layout::prepare_for_resize_animation"); - - match &mut self.monitor_set { - MonitorSet::Normal { monitors, .. } => { - for mon in monitors { - for ws in &mut mon.workspaces { - if ws.has_window(window) { - ws.prepare_for_resize_animation(window); - return; - } - } - } - } - MonitorSet::NoOutputs { workspaces, .. } => { - for ws in workspaces { - if ws.has_window(window) { - ws.prepare_for_resize_animation(window); - return; - } - } - } - } - } - pub fn refresh(&mut self) { let _span = tracy_client::span!("Layout::refresh"); -- cgit