Made active window state global.

This commit is contained in:
Camilla Berglund
2010-09-11 15:14:57 +02:00
parent dc5ba0643d
commit ae57d13868
3 changed files with 12 additions and 4 deletions
+4 -1
View File
@@ -695,6 +695,9 @@ GLFWAPI void glfwCloseWindow(GLFWwindow window)
if (window == _glfwLibrary.currentWindow)
glfwMakeWindowCurrent(NULL);
if (window == _glfwLibrary.activeWindow)
_glfwLibrary.activeWindow = NULL;
_glfwPlatformCloseWindow(window);
prev = &_glfwLibrary.windowListHead;
@@ -900,7 +903,7 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param)
switch (param)
{
case GLFW_ACTIVE:
return window->active;
return window == _glfwLibrary.activeWindow;
case GLFW_ICONIFIED:
return window->iconified;
case GLFW_ACCELERATED: