diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index 80ea89ca9..f542e300e 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -523,11 +523,7 @@ pub fn gtkQuitTimerExpired(ud: ?*anyopaque) callconv(.C) c.gboolean { /// This will get called when there are no more open surfaces. pub fn startQuitTimer(self: *App) void { // Cancel any previous timeout. - if (self.quit_timer_source) |source| { - if (c.g_source_remove(source) == c.FALSE) - log.warn("unable to remove quit timer {d}", .{source}); - self.quit_timer_source = null; - } + self.cancelQuitTimer(); // This is a no-op unless we are configured to quit after last window is closed. if (!self.config.@"quit-after-last-window-closed") return;