mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Add glfwShowWindow, glfwHideWindow
Add glfwShowWindow and glfwHideWindow functions to allow explicit control over show/hide window. Remove platform specific show window code from _glfwPlatformCreateWindow but call glfwShowWindow from glfwCreateWindow to avoid breaking things (for now).
This commit is contained in:
+19
-1
@@ -906,7 +906,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
if (!createContext(window, wndconfig, fbconfig))
|
||||
return GL_FALSE;
|
||||
|
||||
[window->NS.object makeKeyAndOrderFront:nil];
|
||||
[window->NSGL.context setView:[window->NS.object contentView]];
|
||||
|
||||
if (wndconfig->mode == GLFW_FULLSCREEN)
|
||||
@@ -1030,6 +1029,25 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Show window
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
||||
{
|
||||
[window->NS.object makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Hide window
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformHideWindow(_GLFWwindow* window)
|
||||
{
|
||||
[window->NS.object orderOut:nil];
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Write back window parameters into GLFW window structure
|
||||
//========================================================================
|
||||
|
||||
Reference in New Issue
Block a user