mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 15:25:50 +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:
+1
-2
@@ -208,8 +208,7 @@ static void handlePointerMotion(_GLFWwindow* window,
|
||||
int dx = mir_pointer_event_axis_value(pointer_event, mir_pointer_axis_hscroll);
|
||||
int dy = mir_pointer_event_axis_value(pointer_event, mir_pointer_axis_vscroll);
|
||||
|
||||
if (current_x != x || current_y != y)
|
||||
_glfwInputCursorMotion(window, x, y);
|
||||
_glfwInputCursorPos(window, x, y);
|
||||
if (dx != 0 || dy != 0)
|
||||
_glfwInputScroll(window, dx, dy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user