apprt/gtk-ng: must quit scenarios should quit immediately

Fixes #8495

We were incorrectly calling graceful quit under must quit scenarios.
This would do things like confirm quit by inspecting for running
processes. However, must quit scenarios (namely when all windows are
destroyed) should quit immediately without any checks because the
dispose process takes more event loop ticks to fully finish.
This commit is contained in:
Mitchell Hashimoto
2025-09-02 20:40:23 -07:00
parent 8d11c08db3
commit f016b79f22

View File

@@ -476,7 +476,14 @@ pub const Application = extern struct {
break :q false;
};
if (must_quit) self.quit();
if (must_quit) {
// All must quit scenarios do not need confirmation.
// Furthermore, must quit scenarios may result in a situation
// where its unsafe to even access the app/surface memory
// since its in the process of being freed. We must simply
// begin our exit immediately.
self.quitNow();
}
}
}