glfw: respect negative coordinates in window

This commit is contained in:
Jane Petrovna 2022-07-07 13:21:33 -04:00 committed by Stephen Gutekanst
parent 385f718127
commit 62f0db6511

View file

@ -551,8 +551,8 @@ pub inline fn setIcon(self: Window, allocator: mem.Allocator, images: ?[]Image)
} }
pub const Pos = struct { pub const Pos = struct {
x: u32, x: i64,
y: u32, y: i64,
}; };
/// Retrieves the position of the content area of the specified window. /// Retrieves the position of the content area of the specified window.
@ -578,7 +578,7 @@ pub inline fn getPos(self: Window) error{FeatureUnavailable}!Pos {
Error.FeatureUnavailable => |e| e, Error.FeatureUnavailable => |e| e,
else => unreachable, else => unreachable,
}; };
return Pos{ .x = @intCast(u32, x), .y = @intCast(u32, y) }; return Pos{ .x = @intCast(i64, x), .y = @intCast(i64, y) };
} }
/// Sets the position of the content area of the specified window. /// Sets the position of the content area of the specified window.