From 344dc3ae1729521b154bc9a938074e3311f5be99 Mon Sep 17 00:00:00 2001 From: kin fuyuki Date: Sun, 21 Dec 2025 05:25:08 -0300 Subject: [PATCH] added GetMousePositionDesktop global mouse getter (good for clickthrough transparent windows) --- src/rcore.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 79585af20..74ed3bca4 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3689,16 +3689,15 @@ Vector2 GetMousePosition(void) Vector2 GetMousePositionDesktop(void) { Vector2 position = { 0 }; - #ifndef PLATFORM_ANDROID + #if defined(PLATFORM_DESKTOP_GLFW) int wxpos, wypos; - glfwGetWindowPos(GetWindowHandle(), &wxpos, &wypos); + glfwGetWindowPos(platform.handle, &wxpos, &wypos); double xpos, ypos; - glfwGetCursorPos(GetWindowHandle(), &xpos, &ypos); + glfwGetCursorPos(platform.handle, &xpos, &ypos); position.x = wxpos + (floor(xpos)); position.y = wypos + (floor(ypos)); - #else return GetMousePosition(); #endif