Move all cursor positioning to platform code

Due to Wayland, shared code cannot rely on cursor positioning being
supported by the underlying platform.

This implicitly fixes #617 as it moves cursor centering into
_glfwPlatformSetCursorMode, thus separating it from the stale value of
_glfw.cursorWindow.

Fixes #617.
This commit is contained in:
Camilla Berglund
2016-05-25 14:06:02 +02:00
parent 0e846883bf
commit 797ee8d8e3
12 changed files with 205 additions and 182 deletions
+1 -4
View File
@@ -437,9 +437,6 @@ struct _GLFWlibrary
int refreshRate;
} hints;
// Where to place the cursor when re-enabled
double restoreCursorPosX, restoreCursorPosY;
_GLFWcursor* cursorListHead;
_GLFWwindow* windowListHead;
@@ -906,7 +903,7 @@ void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods)
* of the client area of the window.
* @ingroup event
*/
void _glfwInputCursorMotion(_GLFWwindow* window, double x, double y);
void _glfwInputCursorPos(_GLFWwindow* window, double x, double y);
/*! @brief Notifies shared code of a cursor enter/leave event.
* @param[in] window The window that received the event.