From c5a0259796599737f00081ff3451a8832462fa4c Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 25 Jul 2023 16:46:08 +0200 Subject: [PATCH] moving: Don't rescale floating windows --- src/shell/grabs/moving.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/shell/grabs/moving.rs b/src/shell/grabs/moving.rs index d4f580ea..5ac8ea41 100644 --- a/src/shell/grabs/moving.rs +++ b/src/shell/grabs/moving.rs @@ -50,6 +50,7 @@ pub struct MoveGrabState { window_offset: Point, indicator_thickness: u8, start: Instant, + tiling: bool, stacking_indicator: Option<(StackHover, Point)>, } @@ -64,12 +65,15 @@ impl MoveGrabState { #[cfg(feature = "debug")] puffin::profile_function!(); - let scale = 0.6 - + ((1.0 + let scale = if self.tiling { + 0.6 + ((1.0 - (Instant::now().duration_since(self.start).as_millis() as f64 / RESCALE_ANIMATION_DURATION) .min(1.0)) - * 0.4); + * 0.4) + } else { + 1.0 + }; let cursor_at = seat.get_pointer().unwrap().current_location(); @@ -309,6 +313,7 @@ impl MoveGrab { indicator_thickness, start: Instant::now(), stacking_indicator: None, + tiling: was_tiled, }; *seat