diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index b0b317199..2286ecd2b 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -403,12 +403,9 @@ pub fn unref(self: *Surface) void { c.g_object_unref(self.gl_area); } -// TODO: move this -/// Change the container for the surface to `container`. -pub fn setContainer(self: *Surface, container: Container) void { - self.container = container; - - // TODO: do we need to ever update our title or anything here? +pub fn destroy(self: *Surface, alloc: Allocator) void { + self.deinit(); + alloc.destroy(self); } fn render(self: *Surface) !void { diff --git a/src/apprt/gtk/Tab.zig b/src/apprt/gtk/Tab.zig index 4b7ef5ccb..d8c006ce7 100644 --- a/src/apprt/gtk/Tab.zig +++ b/src/apprt/gtk/Tab.zig @@ -97,7 +97,7 @@ pub fn init(self: *Tab, window: *Window, parent_: ?*CoreSurface) !void { .parent2 = parent_, }); errdefer surface.unref(); - surface.setContainer(.{ .tab_ = self }); + surface.container = .{ .tab_ = self }; self.elem = .{ .surface = surface }; // Add Surface to the Tab