mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
Made glfwSetCursorPos fail silently if lacking focus.
This commit is contained in:
@@ -408,10 +408,7 @@ GLFWAPI void glfwSetCursorPos(GLFWwindow handle, int xpos, int ypos)
|
||||
}
|
||||
|
||||
if (_glfwLibrary.focusedWindow != window)
|
||||
{
|
||||
_glfwSetError(GLFW_WINDOW_NOT_FOCUSED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't do anything if the cursor position did not change
|
||||
if (xpos == window->cursorPosX && ypos == window->cursorPosY)
|
||||
|
||||
Reference in New Issue
Block a user