mirror of
https://github.com/glfw/glfw.git
synced 2026-09-17 22:32:50 +00:00
Simplify cursor window logic
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user