mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Moved remaining X visual management into opengl module.
This commit is contained in:
+4
-9
@@ -97,13 +97,14 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||
XEvent event;
|
||||
unsigned long wamask;
|
||||
XSetWindowAttributes wa;
|
||||
XVisualInfo* visual = _glfwGetContextVisual(window);
|
||||
|
||||
// Every window needs a colormap
|
||||
// Create one based on the visual used by the current context
|
||||
|
||||
window->X11.colormap = XCreateColormap(_glfwLibrary.X11.display,
|
||||
_glfwLibrary.X11.root,
|
||||
window->GLX.visual->visual,
|
||||
visual->visual,
|
||||
AllocNone);
|
||||
|
||||
// Create the actual window
|
||||
@@ -133,9 +134,9 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||
0, 0, // Upper left corner of this window on root
|
||||
window->width, window->height,
|
||||
0, // Border width
|
||||
window->GLX.visual->depth, // Color depth
|
||||
visual->depth, // Color depth
|
||||
InputOutput,
|
||||
window->GLX.visual->visual,
|
||||
visual->visual,
|
||||
wamask,
|
||||
&wa
|
||||
);
|
||||
@@ -979,12 +980,6 @@ void _glfwPlatformCloseWindow(_GLFWwindow* window)
|
||||
|
||||
_glfwDestroyContext(window);
|
||||
|
||||
if (window->GLX.visual)
|
||||
{
|
||||
XFree(window->GLX.visual);
|
||||
window->GLX.visual = NULL;
|
||||
}
|
||||
|
||||
if (window->X11.handle)
|
||||
{
|
||||
XUnmapWindow(_glfwLibrary.X11.display, window->X11.handle);
|
||||
|
||||
Reference in New Issue
Block a user