mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 19:42:00 +00:00
Added dumb fix for disabled cursor snapping to center
This commit is contained in:
parent
0ef149c8f2
commit
6419ed578f
@ -1452,6 +1452,10 @@ static void processEvent(XEvent *event)
|
|||||||
updateCursorImage(window);
|
updateCursorImage(window);
|
||||||
|
|
||||||
_glfwInputCursorEnter(window, GLFW_TRUE);
|
_glfwInputCursorEnter(window, GLFW_TRUE);
|
||||||
|
|
||||||
|
// Don't call the cursor callback when GLFW_CURSOR_DISABLED for
|
||||||
|
// this event, it snaps the cursor back to the center
|
||||||
|
if (window->cursorMode != GLFW_CURSOR_DISABLED)
|
||||||
_glfwInputCursorPos(window, x, y);
|
_glfwInputCursorPos(window, x, y);
|
||||||
|
|
||||||
window->x11.lastCursorPosX = x;
|
window->x11.lastCursorPosX = x;
|
||||||
|
Loading…
Reference in New Issue
Block a user