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:
+22
-4
@@ -230,10 +230,6 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||
|
||||
_glfwPlatformSetWindowTitle(window, wndconfig->title);
|
||||
|
||||
// Make sure the window is mapped before proceeding
|
||||
XMapWindow(_glfwLibrary.X11.display, window->X11.handle);
|
||||
XFlush(_glfwLibrary.X11.display);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
@@ -1099,6 +1095,28 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Show window
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
||||
{
|
||||
XMapRaised(_glfwLibrary.X11.display, window->X11.handle);
|
||||
XFlush(_glfwLibrary.X11.display);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Hide window
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformHideWindow(_GLFWwindow* window)
|
||||
{
|
||||
XUnmapWindow(_glfwLibrary.X11.display, window->X11.handle);
|
||||
XFlush(_glfwLibrary.X11.display);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Read back framebuffer parameters from the context
|
||||
//========================================================================
|
||||
|
||||
Reference in New Issue
Block a user