mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 11:35:48 +00:00
Use the new GTK Surface::setParent from the tab and split
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user