From b394cb637977e111d8bb67be12c1f4904f4d9047 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 28 Dec 2024 10:34:24 +0300 Subject: floating: Cancel resize when moving or changing size --- src/layout/floating.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/layout/floating.rs') diff --git a/src/layout/floating.rs b/src/layout/floating.rs index b3647844..0552b01d 100644 --- a/src/layout/floating.rs +++ b/src/layout/floating.rs @@ -638,6 +638,8 @@ impl FloatingSpace { self.set_window_width(Some(&id), change, true); self.tiles[idx].floating_preset_width_idx = Some(preset_idx); + + self.interactive_resize_end(Some(&id)); } pub fn toggle_window_height(&mut self, id: Option<&W::Id>) { @@ -679,6 +681,8 @@ impl FloatingSpace { let tile = &mut self.tiles[idx]; tile.floating_preset_height_idx = Some(preset_idx); + + self.interactive_resize_end(Some(&id)); } pub fn set_window_width(&mut self, id: Option<&W::Id>, change: SizeChange, animate: bool) { @@ -843,6 +847,8 @@ impl FloatingSpace { let new_pos = self.data[active_idx].logical_pos + amount; self.move_and_animate(active_idx, new_pos); + + self.interactive_resize_end(None); } pub fn move_left(&mut self) { @@ -870,6 +876,8 @@ impl FloatingSpace { let new_pos = center_preferring_top_left_in_area(self.working_area, self.data[active_idx].size); self.move_and_animate(active_idx, new_pos); + + self.interactive_resize_end(None); } pub fn descendants_added(&mut self, id: &W::Id) -> bool { -- cgit