From 90a097d45c749ea1570cfa55eb6040517ec0061e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 Aug 2020 11:04:07 +0530 Subject: [PATCH] Ensure beep works even very soon after startup --- kitty/glfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/glfw.c b/kitty/glfw.c index 5aca9cb50..68383cd9f 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -893,7 +893,7 @@ static void ring_audio_bell(void) { static monotonic_t last_bell_at = -1; monotonic_t now = monotonic(); - if (now - last_bell_at <= ms_to_monotonic_t(100ll)) return; + if (last_bell_at >= 0 && now - last_bell_at <= ms_to_monotonic_t(100ll)) return; last_bell_at = now; #ifdef __APPLE__ cocoa_system_beep();