From 74d55aaa197889d52e891dfa3f07122891d184e0 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 19 Jan 2024 10:31:23 -0600 Subject: [PATCH] vaxis: fix window initialization Signed-off-by: Tim Culverhouse --- examples/main.zig | 3 +++ src/vaxis.zig | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/main.zig b/examples/main.zig index ce299d0..ce65859 100644 --- a/examples/main.zig +++ b/examples/main.zig @@ -33,6 +33,9 @@ pub fn main() !void { }, else => {}, } + + const win = vx.window(); + _ = win; } } diff --git a/src/vaxis.zig b/src/vaxis.zig index fe5a040..e78fb22 100644 --- a/src/vaxis.zig +++ b/src/vaxis.zig @@ -93,9 +93,8 @@ pub fn Vaxis(comptime T: type) type { return Window{ .x_off = 0, .y_off = 0, - .w = .{.expand}, - .h = .{.expand}, - .parent = null, + .width = self.screen.width, + .height = self.screen.height, .screen = &self.screen, }; }