mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 05:20:29 +00:00
apprt/gtk: only close with no windows active if close delay is off
Fixes #9052
This commit is contained in:
@@ -530,12 +530,16 @@ pub const Application = extern struct {
|
||||
}
|
||||
|
||||
// If we have no windows attached to our app, also quit.
|
||||
if (priv.requested_window and @as(
|
||||
?*glib.List,
|
||||
self.as(gtk.Application).getWindows(),
|
||||
) == null) {
|
||||
log.debug("must_quit due to no app windows", .{});
|
||||
break :q true;
|
||||
// We only do this if we don't have the closed delay set,
|
||||
// because with the closed delay set we'll exit eventually.
|
||||
if (config.@"quit-after-last-window-closed-delay" == null) {
|
||||
if (priv.requested_window and @as(
|
||||
?*glib.List,
|
||||
self.as(gtk.Application).getWindows(),
|
||||
) == null) {
|
||||
log.debug("must_quit due to no app windows", .{});
|
||||
break :q true;
|
||||
}
|
||||
}
|
||||
|
||||
// No quit conditions met
|
||||
|
||||
Reference in New Issue
Block a user