diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-18 10:38:02 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | 38350935e6f92c2db90faaf059b851f8158e32c2 (patch) | |
| tree | 2f87970799a7648f9fe597ab43836c528e8b2158 /src/layout | |
| parent | 421cd89a0fb0414c1d56e65b234689d9bcb949d0 (diff) | |
| download | niri-38350935e6f92c2db90faaf059b851f8158e32c2.tar.gz niri-38350935e6f92c2db90faaf059b851f8158e32c2.tar.bz2 niri-38350935e6f92c2db90faaf059b851f8158e32c2.zip | |
layout: Rename update_interactive_resize() to on_commit()
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/floating.rs | 2 | ||||
| -rw-r--r-- | src/layout/mod.rs | 5 | ||||
| -rw-r--r-- | src/layout/scrolling.rs | 2 |
3 files changed, 5 insertions, 4 deletions
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<W: LayoutElement> FloatingSpace<W> { // 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<InteractiveResizeData>); fn cancel_interactive_resize(&mut self); - fn update_interactive_resize(&mut self, serial: Serial); fn interactive_resize_data(&self) -> Option<InteractiveResizeData>; + + 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<InteractiveResizeData> { 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<W: LayoutElement> ScrollingSpace<W> { // 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; |
