gtk: a couple more C cleanups

pull/6876/head
Jeffrey C. Ollie 2025-03-22 16:13:08 -05:00
parent 747c43ffa0
commit 1317e62722
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
1 changed files with 3 additions and 3 deletions

View File

@ -1319,10 +1319,10 @@ pub fn run(self: *App) !void {
// This timeout function is started when no surfaces are open. It can be
// cancelled if a new surface is opened before the timer expires.
pub fn gtkQuitTimerExpired(ud: ?*anyopaque) callconv(.C) c.gboolean {
pub fn gtkQuitTimerExpired(ud: ?*anyopaque) callconv(.c) c_int {
const self: *App = @ptrCast(@alignCast(ud));
self.quit_timer = .{ .expired = {} };
return c.FALSE;
return 0;
}
/// This will get called when there are no more open surfaces.
@ -1354,7 +1354,7 @@ fn stopQuitTimer(self: *App) void {
.off => {},
.expired => self.quit_timer = .{ .off = {} },
.active => |source| {
if (c.g_source_remove(source) == c.FALSE) {
if (glib.Source.remove(source) == 0) {
log.warn("unable to remove quit timer source={d}", .{source});
}
self.quit_timer = .{ .off = {} };