forge
Explore
Log in

Don't you dare go Hollow

floating: Cancel resize when moving or changing size

Browse files at this commit

b394cb637977e111d8bb67be12c1f4904f4d9047Ivan MolodetskikhParent: 60854e1
src/layout/floating.rsmodified+8 -0
@@ -638,6 +638,8 @@ impl<W: LayoutElement> FloatingSpace<W> {
638 self.set_window_width(Some(&id), change, true);638 self.set_window_width(Some(&id), change, true);
639 639
640 self.tiles[idx].floating_preset_width_idx = Some(preset_idx);640 self.tiles[idx].floating_preset_width_idx = Some(preset_idx);
641+
642+ self.interactive_resize_end(Some(&id));
641 }643 }
642 644
643 pub fn toggle_window_height(&mut self, id: Option<&W::Id>) {645 pub fn toggle_window_height(&mut self, id: Option<&W::Id>) {
@@ -679,6 +681,8 @@ impl<W: LayoutElement> FloatingSpace<W> {
679 681
680 let tile = &mut self.tiles[idx];682 let tile = &mut self.tiles[idx];
681 tile.floating_preset_height_idx = Some(preset_idx);683 tile.floating_preset_height_idx = Some(preset_idx);
684+
685+ self.interactive_resize_end(Some(&id));
682 }686 }
683 687
684 pub fn set_window_width(&mut self, id: Option<&W::Id>, change: SizeChange, animate: bool) {688 pub fn set_window_width(&mut self, id: Option<&W::Id>, change: SizeChange, animate: bool) {
@@ -843,6 +847,8 @@ impl<W: LayoutElement> FloatingSpace<W> {
843 847
844 let new_pos = self.data[active_idx].logical_pos + amount;848 let new_pos = self.data[active_idx].logical_pos + amount;
845 self.move_and_animate(active_idx, new_pos);849 self.move_and_animate(active_idx, new_pos);
850+
851+ self.interactive_resize_end(None);
846 }852 }
847 853
848 pub fn move_left(&mut self) {854 pub fn move_left(&mut self) {
@@ -870,6 +876,8 @@ impl<W: LayoutElement> FloatingSpace<W> {
870 let new_pos =876 let new_pos =
871 center_preferring_top_left_in_area(self.working_area, self.data[active_idx].size);877 center_preferring_top_left_in_area(self.working_area, self.data[active_idx].size);
872 self.move_and_animate(active_idx, new_pos);878 self.move_and_animate(active_idx, new_pos);
879+
880+ self.interactive_resize_end(None);
873 }881 }
874 882
875 pub fn descendants_added(&mut self, id: &W::Id) -> bool {883 pub fn descendants_added(&mut self, id: &W::Id) -> bool {