fix: disable mouse_idle_timer

It's not very important and it's too spammy which makes debug builds slow.
This commit is contained in:
CJ van den Berg 2025-01-20 15:49:16 +01:00
parent 51e8e9c1ab
commit 29f8b4680d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -56,6 +56,7 @@ mouse_idle_timer: ?tp.Cancellable = null,
default_cursor: keybind.CursorShape = .default, default_cursor: keybind.CursorShape = .default,
fontface: []const u8 = "", fontface: []const u8 = "",
fontfaces: ?std.ArrayList([]const u8) = null, fontfaces: ?std.ArrayList([]const u8) = null,
enable_mouse_idle_timer: bool = false,
const keepalive = std.time.us_per_day * 365; // one year const keepalive = std.time.us_per_day * 365; // one year
const idle_frames = 0; const idle_frames = 0;
@ -222,6 +223,7 @@ fn listen_sigwinch(self: *Self) tp.result {
} }
fn update_mouse_idle_timer(self: *Self) void { 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); const delay = std.time.us_per_ms * @as(u64, mouse_idle_time_milliseconds);
if (self.mouse_idle_timer) |*t| { if (self.mouse_idle_timer) |*t| {
t.cancel() catch {}; t.cancel() catch {};