From 82614511ab1bd889e8870abed01d7c3db062bdd4 Mon Sep 17 00:00:00 2001 From: Peter Guy Date: Sat, 11 Oct 2025 22:21:45 -0700 Subject: [PATCH] Use the new GTK Surface::setParent from the tab and split --- src/apprt/gtk/class/split_tree.zig | 2 +- src/apprt/gtk/class/tab.zig | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/apprt/gtk/class/split_tree.zig b/src/apprt/gtk/class/split_tree.zig index 46b3268d9..8d859adca 100644 --- a/src/apprt/gtk/class/split_tree.zig +++ b/src/apprt/gtk/class/split_tree.zig @@ -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); } } diff --git a/src/apprt/gtk/class/tab.zig b/src/apprt/gtk/class/tab.zig index fb3b8b0ef..ae05cd1ad 100644 --- a/src/apprt/gtk/class/tab.zig +++ b/src/apprt/gtk/class/tab.zig @@ -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); } }