Simplify cursor window logic

This commit is contained in:
Camilla Berglund
2016-05-30 21:21:09 +02:00
parent 03db3ed6e9
commit 2d2756cbad
9 changed files with 104 additions and 104 deletions
-8
View File
@@ -42,8 +42,6 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused)
{
if (focused)
{
_glfw.cursorWindow = window;
if (window->callbacks.focus)
window->callbacks.focus((GLFWwindow*) window, focused);
}
@@ -51,8 +49,6 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused)
{
int i;
_glfw.cursorWindow = NULL;
if (window->callbacks.focus)
window->callbacks.focus((GLFWwindow*) window, focused);
@@ -394,10 +390,6 @@ GLFWAPI void glfwDestroyWindow(GLFWwindow* handle)
if (window == _glfwPlatformGetCurrentContext())
glfwMakeContextCurrent(NULL);
// Clear the focused window pointer if this is the focused window
if (_glfw.cursorWindow == window)
_glfw.cursorWindow = NULL;
_glfwPlatformDestroyWindow(window);
// Unlink window from global linked list