mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
Move app quit to apprt action
This changes quit signaling from a boolean return from core app `tick()` to an apprt action. This simplifies the API and conceptually makes more sense to me now. This wasn't done just for that; this change was also needed so that macOS can quit cleanly while fixing #4540 since we may no longer trigger menu items. I wanted to split this out into a separate commit/PR because it adds complexity making the diff harder to read.
This commit is contained in:
@ -1623,7 +1623,9 @@ fn gtkActionQuit(
|
|||||||
ud: ?*anyopaque,
|
ud: ?*anyopaque,
|
||||||
) callconv(.C) void {
|
) callconv(.C) void {
|
||||||
const self: *App = @ptrCast(@alignCast(ud orelse return));
|
const self: *App = @ptrCast(@alignCast(ud orelse return));
|
||||||
self.core_app.setQuit();
|
self.core_app.performAction(self, .quit) catch |err| {
|
||||||
|
log.err("error quitting err={}", .{err});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Action sent by the window manager asking us to present a specific surface to
|
/// Action sent by the window manager asking us to present a specific surface to
|
||||||
|
Reference in New Issue
Block a user