diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-28 10:34:24 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | b394cb637977e111d8bb67be12c1f4904f4d9047 (patch) | |
| tree | 666529ad28deb4326f5d3610d7cb3c68d30ef0dc | |
| parent | 60854e180e692de3ec4acd505936e34a8640f1f6 (diff) | |
| download | niri-b394cb637977e111d8bb67be12c1f4904f4d9047.tar.gz niri-b394cb637977e111d8bb67be12c1f4904f4d9047.tar.bz2 niri-b394cb637977e111d8bb67be12c1f4904f4d9047.zip | |
floating: Cancel resize when moving or changing size
| -rw-r--r-- | src/layout/floating.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<W: LayoutElement> FloatingSpace<W> { 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<W: LayoutElement> FloatingSpace<W> { 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<W: LayoutElement> FloatingSpace<W> { 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<W: LayoutElement> FloatingSpace<W> { 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 { |
