Use the new GTK Surface::setParent from the tab and split

This commit is contained in:
Peter Guy
2025-10-11 22:21:45 -07:00
parent 05229502bf
commit 82614511ab
2 changed files with 6 additions and 2 deletions

View File

@@ -219,7 +219,7 @@ pub const SplitTree = extern struct {
// Inherit properly if we were asked to.
if (parent_) |p| {
if (p.core()) |core| {
surface.setParent(core);
surface.setParent(core, .split);
}
}

View File

@@ -161,8 +161,12 @@ pub const Tab = extern struct {
/// ever created for a tab. If a surface was already created this does
/// nothing.
pub fn setParent(self: *Self, parent: *CoreSurface) void {
self.setParentWithContext(parent, .tab);
}
pub fn setParentWithContext(self: *Self, parent: *CoreSurface, context: apprt.surface.NewSurfaceContext) void {
if (self.getActiveSurface()) |surface| {
surface.setParent(parent);
surface.setParent(parent, context);
}
}