From 29f8b4680de09a3fe9618b2c880587c448500f78 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 20 Jan 2025 15:49:16 +0100 Subject: [PATCH] fix: disable mouse_idle_timer It's not very important and it's too spammy which makes debug builds slow. --- src/tui/tui.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tui/tui.zig b/src/tui/tui.zig index faa3216..198362e 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -56,6 +56,7 @@ mouse_idle_timer: ?tp.Cancellable = null, default_cursor: keybind.CursorShape = .default, fontface: []const u8 = "", fontfaces: ?std.ArrayList([]const u8) = null, +enable_mouse_idle_timer: bool = false, const keepalive = std.time.us_per_day * 365; // one year const idle_frames = 0; @@ -222,6 +223,7 @@ fn listen_sigwinch(self: *Self) tp.result { } fn update_mouse_idle_timer(self: *Self) void { + if (!self.enable_mouse_idle_timer) return; const delay = std.time.us_per_ms * @as(u64, mouse_idle_time_milliseconds); if (self.mouse_idle_timer) |*t| { t.cancel() catch {};