From 04013379db7fe2d1d33e54792647c933435bb30f Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Thu, 7 Jul 2022 13:21:33 -0400 Subject: [PATCH] glfw: respect negative coordinates in window --- glfw/src/Window.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glfw/src/Window.zig b/glfw/src/Window.zig index 88349bf2..a22cea73 100644 --- a/glfw/src/Window.zig +++ b/glfw/src/Window.zig @@ -551,8 +551,8 @@ pub inline fn setIcon(self: Window, allocator: mem.Allocator, images: ?[]Image) } pub const Pos = struct { - x: u32, - y: u32, + x: i64, + y: i64, }; /// 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, 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.