Made glfwSetCursorPos fail silently if lacking focus.

This commit is contained in:
Camilla Berglund
2012-11-22 17:20:16 +01:00
parent c479124e69
commit 998cb5144e
3 changed files with 1 additions and 9 deletions
-3
View File
@@ -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)