From 3a5bffdb5c1ea8413c1a3ed1bef4ade1f3060d80 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Wed, 26 Jul 2023 16:13:12 +0200 Subject: [PATCH] tiling: Adjust mouse hover delays --- src/shell/layout/tiling/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/shell/layout/tiling/mod.rs b/src/shell/layout/tiling/mod.rs index 681d6d05..cf478745 100644 --- a/src/shell/layout/tiling/mod.rs +++ b/src/shell/layout/tiling/mod.rs @@ -60,6 +60,8 @@ pub use self::blocker::*; pub use self::grabs::*; pub const ANIMATION_DURATION: Duration = Duration::from_millis(200); +pub const MOUSE_ANIMATION_DELAY: Duration = Duration::from_millis(150); +pub const INTIAL_MOUSE_ANIMATION_DELAY: Duration = Duration::from_millis(500); #[derive(Debug, Clone)] struct OutputData { @@ -2478,12 +2480,12 @@ impl TilingLayout { let overdue = if let Some(instant) = instant { match old_target_zone { TargetZone::InitialPlaceholder(_) => { - Instant::now().duration_since(*instant).as_millis() - > 500 + Instant::now().duration_since(*instant) + > INTIAL_MOUSE_ANIMATION_DELAY } _ => { - Instant::now().duration_since(*instant).as_millis() - > 200 + Instant::now().duration_since(*instant) + > MOUSE_ANIMATION_DELAY } } } else {