core: quit-after-last-window-closed works properly with "exit"

Fixes #1085

This moves the logic of exiting when there are no surfaces left fully to
apprt and away from the core.
This commit is contained in:
Mitchell Hashimoto
2023-12-13 16:35:14 -08:00
parent cc6270f549
commit b021d76edf
3 changed files with 4 additions and 4 deletions

View File

@@ -103,8 +103,8 @@ pub fn tick(self: *App, rt_app: *apprt.App) !bool {
// doesn't want to quit, then we can't force it to.
defer self.quit = false;
// We quit if our quit flag is on or if we have closed all surfaces.
return self.quit or self.surfaces.items.len == 0;
// We quit if our quit flag is on
return self.quit;
}
/// Update the configuration associated with the app. This can only be