diff --git a/src/x11_window.c b/src/x11_window.c index 4cd32940..b313daec 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1452,7 +1452,11 @@ static void processEvent(XEvent *event) updateCursorImage(window); _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.lastCursorPosY = y;