apprt/gtk: only close with no windows active if close delay is off (#9053)

Fixes #9052
pull/9059/head
Mitchell Hashimoto 2025-10-06 09:19:33 -07:00 committed by GitHub
commit 16026f3023
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 6 deletions

View File

@ -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