mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
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:
+3
-3
@@ -784,9 +784,9 @@ static void handleRelativeMotion(void* data,
|
||||
if (window->cursorMode != GLFW_CURSOR_DISABLED)
|
||||
return;
|
||||
|
||||
_glfwInputCursorMotion(window,
|
||||
wl_fixed_to_double(dxUnaccel),
|
||||
wl_fixed_to_double(dyUnaccel));
|
||||
_glfwInputCursorPos(window,
|
||||
window->virtualCursorPosX + wl_fixed_to_double(dxUnaccel),
|
||||
window->virtualCursorPosY + wl_fixed_to_double(dyUnaccel));
|
||||
}
|
||||
|
||||
static const struct zwp_relative_pointer_v1_listener relativePointerListener = {
|
||||
|
||||
Reference in New Issue
Block a user