From 95c44ab2988496954ede8887389b65ef4970fc03 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 17 Feb 2016 14:52:01 +0100 Subject: [PATCH] Fix cursor coordinate phrasing Fixes #387. --- docs/input.dox | 5 +++-- include/GLFW/glfw3.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/input.dox b/docs/input.dox index e36770ad..5798fde4 100644 --- a/docs/input.dox +++ b/docs/input.dox @@ -224,8 +224,9 @@ position callback. glfwSetCursorPosCallback(window, cursor_pos_callback); @endcode -The callback functions receives the cursor position. On platforms that provide -it, the full sub-pixel cursor position is passed on. +The callback functions receives the cursor position, measured in screen +coordinates but relative to the top-left corner of the window client area. On +platforms that provide it, the full sub-pixel cursor position is passed on. @code static void cursor_position_callback(GLFWwindow* window, double xpos, double ypos) diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 71aac171..4bd7e26c 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -956,8 +956,10 @@ typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int); * This is the function signature for cursor position callback functions. * * @param[in] window The window that received the event. - * @param[in] xpos The new x-coordinate, in screen coordinates, of the cursor. - * @param[in] ypos The new y-coordinate, in screen coordinates, of the cursor. + * @param[in] xpos The new cursor x-coordinate, relative to the left edge of + * the client area. + * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the + * client area. * * @sa @ref cursor_pos * @sa glfwSetCursorPosCallback