mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
re-add dimensions
This commit is contained in:
@ -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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user