diff --git a/src/apprt/gtk/Paned.zig b/src/apprt/gtk/Paned.zig index 5e8ccec39..731513e0d 100644 --- a/src/apprt/gtk/Paned.zig +++ b/src/apprt/gtk/Paned.zig @@ -203,6 +203,18 @@ fn addChild2(self: *Paned, child: Child) void { child.setParent(.{ .paned = .{ self, .end } }); } +fn surfaceInPosition(self: *Paned, position: Position) ?*Surface { + const child = switch (position) { + .start => self.child1, + .end => self.child2, + }; + + return switch (child) { + .surface => |surface| surface, + else => null, + }; +} + pub fn deinit(self: *Paned, alloc: Allocator) void { switch (self.child1) { .none, .surface => {}, @@ -220,15 +232,3 @@ pub fn deinit(self: *Paned, alloc: Allocator) void { }, } } - -fn surfaceInPosition(self: *Paned, position: Position) ?*Surface { - const child = switch (position) { - .start => self.child1, - .end => self.child2, - }; - - return switch (child) { - .surface => |surface| surface, - else => null, - }; -}