|
@@ -82,8 +82,9 @@ void _glfwSetDefaultWindowHints(void)
|
|
_glfwLibrary.hints.glMajor = 1;
|
|
_glfwLibrary.hints.glMajor = 1;
|
|
_glfwLibrary.hints.glMinor = 0;
|
|
_glfwLibrary.hints.glMinor = 0;
|
|
|
|
|
|
- // The default is to allow window resizing
|
|
|
|
|
|
+ // The default is to show the window and allow window resizing
|
|
_glfwLibrary.hints.resizable = GL_TRUE;
|
|
_glfwLibrary.hints.resizable = GL_TRUE;
|
|
|
|
+ _glfwLibrary.hints.visible = GL_TRUE;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -176,6 +177,16 @@ void _glfwInputWindowIconify(_GLFWwindow* window, int iconified)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+//========================================================================
|
|
|
|
+// Register window visibility events
|
|
|
|
+//========================================================================
|
|
|
|
+
|
|
|
|
+void _glfwInputWindowVisibility(_GLFWwindow* window, int visible)
|
|
|
|
+{
|
|
|
|
+ window->visible = visible;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
//========================================================================
|
|
//========================================================================
|
|
// Register window damage events
|
|
// Register window damage events
|
|
//========================================================================
|
|
//========================================================================
|
|
@@ -246,6 +257,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
|
|
wndconfig.title = title;
|
|
wndconfig.title = title;
|
|
wndconfig.refreshRate = Max(_glfwLibrary.hints.refreshRate, 0);
|
|
wndconfig.refreshRate = Max(_glfwLibrary.hints.refreshRate, 0);
|
|
wndconfig.resizable = _glfwLibrary.hints.resizable ? GL_TRUE : GL_FALSE;
|
|
wndconfig.resizable = _glfwLibrary.hints.resizable ? GL_TRUE : GL_FALSE;
|
|
|
|
+ wndconfig.visible = _glfwLibrary.hints.visible ? GL_TRUE : GL_FALSE;
|
|
wndconfig.glMajor = _glfwLibrary.hints.glMajor;
|
|
wndconfig.glMajor = _glfwLibrary.hints.glMajor;
|
|
wndconfig.glMinor = _glfwLibrary.hints.glMinor;
|
|
wndconfig.glMinor = _glfwLibrary.hints.glMinor;
|
|
wndconfig.glForward = _glfwLibrary.hints.glForward ? GL_TRUE : GL_FALSE;
|
|
wndconfig.glForward = _glfwLibrary.hints.glForward ? GL_TRUE : GL_FALSE;
|
|
@@ -318,8 +330,6 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
|
|
return GL_FALSE;
|
|
return GL_FALSE;
|
|
}
|
|
}
|
|
|
|
|
|
- glfwShowWindow(window);
|
|
|
|
-
|
|
|
|
// Cache the actual (as opposed to requested) window parameters
|
|
// Cache the actual (as opposed to requested) window parameters
|
|
_glfwPlatformRefreshWindowParams(window);
|
|
_glfwPlatformRefreshWindowParams(window);
|
|
|
|
|
|
@@ -353,6 +363,9 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
_glfwPlatformSwapBuffers(window);
|
|
_glfwPlatformSwapBuffers(window);
|
|
|
|
|
|
|
|
+ if (wndconfig.visible)
|
|
|
|
+ glfwShowWindow(window);
|
|
|
|
+
|
|
return window;
|
|
return window;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -413,6 +426,9 @@ GLFWAPI void glfwWindowHint(int target, int hint)
|
|
case GLFW_RESIZABLE:
|
|
case GLFW_RESIZABLE:
|
|
_glfwLibrary.hints.resizable = hint;
|
|
_glfwLibrary.hints.resizable = hint;
|
|
break;
|
|
break;
|
|
|
|
+ case GLFW_VISIBLE:
|
|
|
|
+ _glfwLibrary.hints.visible = hint;
|
|
|
|
+ break;
|
|
case GLFW_FSAA_SAMPLES:
|
|
case GLFW_FSAA_SAMPLES:
|
|
_glfwLibrary.hints.samples = hint;
|
|
_glfwLibrary.hints.samples = hint;
|
|
break;
|
|
break;
|