apprt/gtk: ensure configuration is loaded on startup

Restores the app configuration code removed in
https://github.com/ghostty-org/ghostty/pull/6792.

The was unnoticed due to `colorSchemeEvent` triggering a
configuration reload if `window-theme` deviates from the default
(i.e. dark mode is used).

Fixes https://github.com/ghostty-org/ghostty/discussions/7206
This commit is contained in:
Leorize 2025-05-01 01:36:41 -05:00
parent 2b4f1f8b84
commit 0af5a291ac
No known key found for this signature in database
GPG Key ID: F27DAB17D7AD45CE

View File

@ -1291,6 +1291,13 @@ pub fn run(self: *App) !void {
// Setup our actions
self.initActions();
// On startup, we want to check for configuration errors right away
// so we can show our error window. We also need to setup other initial
// state.
self.syncConfigChanges(null) catch |err| {
log.warn("error handling configuration changes err={}", .{err});
};
while (self.running) {
_ = glib.MainContext.iteration(self.ctx, 1);