summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/windows/platform.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/windows/platform.c b/src/windows/platform.c
index 06384d3..29e8970 100644
--- a/src/windows/platform.c
+++ b/src/windows/platform.c
@@ -888,9 +888,15 @@ void platform_handle_events(platform_window *window, mouse_input *mouse, keyboar
RECT rec;
GetWindowRect(window->window_handle, &rec);
+
POINT p;
GetCursorPos(&p);
+ ScreenToClient(current_window_to_handle->window_handle, &p);
+
+ mouse->y = p.y;
+ mouse->x = p.x;
+#if 0
if (current_window_to_handle->flags & FLAGS_GLOBAL_MOUSE)
mouse->x = p.x - rec.left;
else
@@ -900,6 +906,7 @@ void platform_handle_events(platform_window *window, mouse_input *mouse, keyboar
mouse->y = p.y - rec.top;
else
mouse->y = p.y - rec.top - GetSystemMetrics(SM_CYSIZE) - GetSystemMetrics(SM_CYFRAME);
+#endif
}
#endif