gtk: remove unneeded method setContainer on Surface

We don't need to update the titles, etc. since that's done by
`grabFocus` and that then makes the method not that useful. Removing for
now.
This commit is contained in:
Thorsten Ball
2023-11-26 13:18:43 +01:00
committed by Mitchell Hashimoto
parent 1b4fc83f43
commit 7e9dce054f
2 changed files with 4 additions and 7 deletions

View File

@ -403,12 +403,9 @@ pub fn unref(self: *Surface) void {
c.g_object_unref(self.gl_area); c.g_object_unref(self.gl_area);
} }
// TODO: move this pub fn destroy(self: *Surface, alloc: Allocator) void {
/// Change the container for the surface to `container`. self.deinit();
pub fn setContainer(self: *Surface, container: Container) void { alloc.destroy(self);
self.container = container;
// TODO: do we need to ever update our title or anything here?
} }
fn render(self: *Surface) !void { fn render(self: *Surface) !void {

View File

@ -97,7 +97,7 @@ pub fn init(self: *Tab, window: *Window, parent_: ?*CoreSurface) !void {
.parent2 = parent_, .parent2 = parent_,
}); });
errdefer surface.unref(); errdefer surface.unref();
surface.setContainer(.{ .tab_ = self }); surface.container = .{ .tab_ = self };
self.elem = .{ .surface = surface }; self.elem = .{ .surface = surface };
// Add Surface to the Tab // Add Surface to the Tab