gtk: a couple more C cleanups (#6876)
commit
c58fe676ad
|
|
@ -1306,10 +1306,10 @@ pub fn run(self: *App) !void {
|
||||||
|
|
||||||
// This timeout function is started when no surfaces are open. It can be
|
// This timeout function is started when no surfaces are open. It can be
|
||||||
// cancelled if a new surface is opened before the timer expires.
|
// 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));
|
const self: *App = @ptrCast(@alignCast(ud));
|
||||||
self.quit_timer = .{ .expired = {} };
|
self.quit_timer = .{ .expired = {} };
|
||||||
return c.FALSE;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This will get called when there are no more open surfaces.
|
/// This will get called when there are no more open surfaces.
|
||||||
|
|
@ -1341,7 +1341,7 @@ fn stopQuitTimer(self: *App) void {
|
||||||
.off => {},
|
.off => {},
|
||||||
.expired => self.quit_timer = .{ .off = {} },
|
.expired => self.quit_timer = .{ .off = {} },
|
||||||
.active => |source| {
|
.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});
|
log.warn("unable to remove quit timer source={d}", .{source});
|
||||||
}
|
}
|
||||||
self.quit_timer = .{ .off = {} };
|
self.quit_timer = .{ .off = {} };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue