Skip to content

Commit

Permalink
Merge pull request #2566 from jcollie/gtk-window-destroy
Browse files Browse the repository at this point in the history
gtk: use correct function to destroy window
  • Loading branch information
mitchellh authored Nov 2, 2024
2 parents e7ccc60 + 6d8cf55 commit d22464f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/apprt/gtk/Window.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d22464f

Please sign in to comment.