From 656c7208666c95d5dfea836e66d221dee27dcb5e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 4 Aug 2024 19:06:17 -0700 Subject: [PATCH] apprt/gtk: can manually expire our quit timer instead of 0 second timer --- src/apprt/gtk/App.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index 8f3e7c997..4442f79db 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -539,9 +539,8 @@ pub fn startQuitTimer(self: *App) void { const t = std.math.cast(c.guint, ms) orelse std.math.maxInt(c.guint); self.quit_timer = .{ .active = c.g_timeout_add(t, gtkQuitTimerExpired, self) }; } else { - // If no delay is configured, we still need a 0ms timer to break out of - // g_main_context_iteration so that control returns to our code. - self.quit_timer = .{ .active = c.g_timeout_add(0, gtkQuitTimerExpired, self) }; + // If no delay is configured, treat it as expired. + self.quit_timer = .{ .expired = {} }; } }