macOS: reduce mechanism to create windows back to one

This commit is contained in:
Thorsten Ball
2023-08-19 19:41:34 +02:00
parent a76aea4d0a
commit fbe42fbac7
2 changed files with 16 additions and 9 deletions

View File

@@ -151,6 +151,17 @@ pub const App = struct {
_ = surface;
// No-op, we use a threaded interface so we're constantly drawing.
}
pub fn newWindow(self: *App, parent: ?*CoreSurface) !void {
_ = self;
// Right now we only support creating a new window with a parent
// through this code.
// The other case is handled by the embedding runtime.
if (parent) |surface| {
try surface.rt_surface.newWindow();
}
}
};
pub const Surface = struct {