fix(win32 gui): send initial resize event on window creation

closes #115
This commit is contained in:
CJ van den Berg 2025-01-05 15:17:25 +01:00
parent 8b43cc3697
commit 9d9372bfe0
2 changed files with 2 additions and 2 deletions

View file

@ -106,8 +106,7 @@ pub fn run(self: *Self) !void {
drop_writer.writer().any(), drop_writer.writer().any(),
.{ .rows = 25, .cols = 80, .x_pixel = 0, .y_pixel = 0 }, .{ .rows = 25, .cols = 80, .x_pixel = 0, .y_pixel = 0 },
); );
self.vx.queueRefresh();
//if (self.dispatch_event) |f| f(self.handler_ctx, try self.fmtmsg(.{"resize"}));
self.thread = try gui.start(); self.thread = try gui.start();
} }

View file

@ -1056,6 +1056,7 @@ fn WndProc(
); );
std.debug.assert(existing == 0); std.debug.assert(existing == 0);
std.debug.assert(state == stateFromHwnd(hwnd)); std.debug.assert(state == stateFromHwnd(hwnd));
sendResize(hwnd);
return 0; return 0;
}, },
win32.WM_DESTROY => { win32.WM_DESTROY => {