mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
apprt/gtk: can manually expire our quit timer instead of 0 second timer
This commit is contained in:
@ -539,9 +539,8 @@ pub fn startQuitTimer(self: *App) void {
|
|||||||
const t = std.math.cast(c.guint, ms) orelse std.math.maxInt(c.guint);
|
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) };
|
self.quit_timer = .{ .active = c.g_timeout_add(t, gtkQuitTimerExpired, self) };
|
||||||
} else {
|
} else {
|
||||||
// If no delay is configured, we still need a 0ms timer to break out of
|
// If no delay is configured, treat it as expired.
|
||||||
// g_main_context_iteration so that control returns to our code.
|
self.quit_timer = .{ .expired = {} };
|
||||||
self.quit_timer = .{ .active = c.g_timeout_add(0, gtkQuitTimerExpired, self) };
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user