re-add dimensions

This commit is contained in:
Raiden1411
2023-11-07 19:24:02 +00:00
parent b9ad49acc3
commit b0f6b1e2c9

View File

@ -405,13 +405,17 @@ pub const Surface = struct {
win.setMouseButtonCallback(mouseButtonCallback); win.setMouseButtonCallback(mouseButtonCallback);
win.setDropCallback(dropCallback); win.setDropCallback(dropCallback);
const pos = win.getPos();
const size = win.getFramebufferSize();
const dimensions = .{ .width = size.width, .height = size.height, .position_x = pos.x, .position_y = pos.y };
// Build our result // Build our result
self.* = .{ self.* = .{
.app = app, .app = app,
.window = win, .window = win,
.cursor = null, .cursor = null,
.core_surface = undefined, .core_surface = undefined,
.window_dimensions = undefined, .window_dimensions = dimensions,
}; };
errdefer self.* = undefined; errdefer self.* = undefined;