core: darwin: fix inverted width/height

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-12-01 12:23:12 -07:00 committed by Emi Gutekanst
parent 3bb7833e38
commit 3b45eda8df

View file

@ -73,8 +73,8 @@ pub fn tick(core: *Core) !void {
// Handle resizing the window when the user changes width or height // Handle resizing the window when the user changes width or height
if (core.windows.updated(window_id, .width) or core.windows.updated(window_id, .height)) { if (core.windows.updated(window_id, .width) or core.windows.updated(window_id, .height)) {
var frame = native_window.frame(); var frame = native_window.frame();
frame.size.height = @floatFromInt(core.windows.get(window_id, .width)); frame.size.width = @floatFromInt(core.windows.get(window_id, .width));
frame.size.width = @floatFromInt(core.windows.get(window_id, .height)); frame.size.height = @floatFromInt(core.windows.get(window_id, .height));
native_window.setFrame_display_animate(frame, true, true); native_window.setFrame_display_animate(frame, true, true);
} }
} }