mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
apprt/gtk: if errors fixed, hide window
This commit is contained in:
@ -178,8 +178,9 @@ fn updateConfigErrors(self: *App) !void {
|
||||
try ConfigErrorsWindow.create(self);
|
||||
assert(self.config_errors_window != null);
|
||||
}
|
||||
}
|
||||
|
||||
const window = self.config_errors_window.?;
|
||||
if (self.config_errors_window) |window| {
|
||||
window.update();
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,11 @@ pub fn create(app: *App) !void {
|
||||
}
|
||||
|
||||
pub fn update(self: *ConfigErrors) void {
|
||||
if (self.app.config._errors.empty()) {
|
||||
c.gtk_window_destroy(@ptrCast(self.window));
|
||||
return;
|
||||
}
|
||||
|
||||
self.view.update(&self.app.config);
|
||||
_ = c.gtk_window_present(self.window);
|
||||
_ = c.gtk_widget_grab_focus(@ptrCast(self.window));
|
||||
|
Reference in New Issue
Block a user