Merge pull request #2566 from jcollie/gtk-window-destroy

gtk: use correct function to destroy window
pull/2573/head
Mitchell Hashimoto 2024-11-01 20:04:26 -07:00 committed by GitHub
commit d22464fbfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -92,13 +92,9 @@ pub fn init(self: *Window, app: *App) !void {
break :window window;
}
};
errdefer c.gtk_window_destroy(@ptrCast(window));
const gtk_window: *c.GtkWindow = @ptrCast(window);
errdefer if (self.isAdwWindow()) {
c.adw_application_window_destroy(window);
} else {
c.gtk_application_window_destroy(gtk_window);
};
self.window = gtk_window;
c.gtk_window_set_title(gtk_window, "Ghostty");
c.gtk_window_set_default_size(gtk_window, 1000, 600);