From 49cfd9c9ae363e32393e2f4f5e44d538d3de9b3c Mon Sep 17 00:00:00 2001 From: malc Date: Fri, 27 Jan 2012 16:33:05 +0400 Subject: [PATCH] Properly handle throttled setzoom --- main.ml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/main.ml b/main.ml index ba36359..af3c14c 100644 --- a/main.ml +++ b/main.ml @@ -1838,7 +1838,19 @@ let setzoom zoom = state.text <- Printf.sprintf "zoom is now %-5.1f" (zoom *. 100.0); ) - | _ -> () + | Some (layout, y, started) -> + let time = + match conf.maxwait with + | None -> 0.0 + | Some t -> t + in + let dt = now () -. started in + if dt > time + then ( + state.y <- y; + load layout; + G.postRedisplay "zoom maxwait"; + ) ;; let enterbirdseye () = -- 2.11.4.GIT