From 38350935e6f92c2db90faaf059b851f8158e32c2 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 18 Dec 2024 10:38:02 +0300 Subject: layout: Rename update_interactive_resize() to on_commit() --- src/layout/floating.rs | 2 +- src/layout/mod.rs | 5 +++-- src/layout/scrolling.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/layout') diff --git a/src/layout/floating.rs b/src/layout/floating.rs index 2d7d0457..ee9c7013 100644 --- a/src/layout/floating.rs +++ b/src/layout/floating.rs @@ -752,7 +752,7 @@ impl FloatingSpace { // Do this before calling update_window() so it can get up-to-date info. if let Some(serial) = serial { - tile.window_mut().update_interactive_resize(serial); + tile.window_mut().on_commit(serial); } let prev_size = data.size; diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 9f43b963..7378aa60 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -198,8 +198,9 @@ pub trait LayoutElement { fn set_interactive_resize(&mut self, data: Option); fn cancel_interactive_resize(&mut self); - fn update_interactive_resize(&mut self, serial: Serial); fn interactive_resize_data(&self) -> Option; + + fn on_commit(&mut self, serial: Serial); } #[derive(Debug)] @@ -4076,7 +4077,7 @@ mod tests { fn cancel_interactive_resize(&mut self) {} - fn update_interactive_resize(&mut self, _serial: Serial) {} + fn on_commit(&mut self, _serial: Serial) {} fn interactive_resize_data(&self) -> Option { None diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index ee4378a3..1fe8cc34 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -1071,7 +1071,7 @@ impl ScrollingSpace { // Do this before calling update_window() so it can get up-to-date info. if let Some(serial) = serial { - tile.window_mut().update_interactive_resize(serial); + tile.window_mut().on_commit(serial); } let prev_width = self.data[col_idx].width; -- cgit