Add the surface context to the Surface's setParent

In order to set the private context variable so that initiSurface can use it.
This commit is contained in:
Peter Guy
2025-10-11 22:19:17 -07:00
parent 496f5b3ed7
commit 05229502bf

View File

@@ -699,6 +699,7 @@ pub const Surface = extern struct {
pub fn setParent(
self: *Self,
parent: *CoreSurface,
context: apprt.surface.NewSurfaceContext,
) void {
const priv = self.private();
@@ -709,6 +710,9 @@ pub const Surface = extern struct {
return;
}
// Store the context so initSurface can use it
priv.context = context;
// Setup our font size
const font_size_ptr = glib.ext.create(font.face.DesiredSize);
errdefer glib.ext.destroy(font_size_ptr);