This commit is contained in:
tomc1998 2025-01-19 07:29:43 +00:00 committed by GitHub
commit 626cd9b87c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1437,7 +1437,11 @@ static void processEvent(XEvent *event)
updateCursorImage(window); updateCursorImage(window);
_glfwInputCursorEnter(window, GLFW_TRUE); _glfwInputCursorEnter(window, GLFW_TRUE);
_glfwInputCursorPos(window, x, y);
// 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);
window->x11.lastCursorPosX = x; window->x11.lastCursorPosX = x;
window->x11.lastCursorPosY = y; window->x11.lastCursorPosY = y;