moving: Don't rescale floating windows

This commit is contained in:
Victoria Brekenfeld 2023-07-25 16:46:08 +02:00
parent 51a59b167f
commit c5a0259796

View file

@ -50,6 +50,7 @@ pub struct MoveGrabState {
window_offset: Point<i32, Logical>, window_offset: Point<i32, Logical>,
indicator_thickness: u8, indicator_thickness: u8,
start: Instant, start: Instant,
tiling: bool,
stacking_indicator: Option<(StackHover, Point<i32, Logical>)>, stacking_indicator: Option<(StackHover, Point<i32, Logical>)>,
} }
@ -64,12 +65,15 @@ impl MoveGrabState {
#[cfg(feature = "debug")] #[cfg(feature = "debug")]
puffin::profile_function!(); puffin::profile_function!();
let scale = 0.6 let scale = if self.tiling {
+ ((1.0 0.6 + ((1.0
- (Instant::now().duration_since(self.start).as_millis() as f64 - (Instant::now().duration_since(self.start).as_millis() as f64
/ RESCALE_ANIMATION_DURATION) / RESCALE_ANIMATION_DURATION)
.min(1.0)) .min(1.0))
* 0.4); * 0.4)
} else {
1.0
};
let cursor_at = seat.get_pointer().unwrap().current_location(); let cursor_at = seat.get_pointer().unwrap().current_location();
@ -309,6 +313,7 @@ impl MoveGrab {
indicator_thickness, indicator_thickness,
start: Instant::now(), start: Instant::now(),
stacking_indicator: None, stacking_indicator: None,
tiling: was_tiled,
}; };
*seat *seat