|
|
@ -97,13 +97,14 @@ static GLboolean createWindow(_GLFWwindow* window, |
|
|
|
XEvent event; |
|
|
|
XEvent event; |
|
|
|
unsigned long wamask; |
|
|
|
unsigned long wamask; |
|
|
|
XSetWindowAttributes wa; |
|
|
|
XSetWindowAttributes wa; |
|
|
|
|
|
|
|
XVisualInfo* visual = _glfwGetContextVisual(window); |
|
|
|
|
|
|
|
|
|
|
|
// Every window needs a colormap
|
|
|
|
// Every window needs a colormap
|
|
|
|
// Create one based on the visual used by the current context
|
|
|
|
// Create one based on the visual used by the current context
|
|
|
|
|
|
|
|
|
|
|
|
window->X11.colormap = XCreateColormap(_glfwLibrary.X11.display, |
|
|
|
window->X11.colormap = XCreateColormap(_glfwLibrary.X11.display, |
|
|
|
_glfwLibrary.X11.root, |
|
|
|
_glfwLibrary.X11.root, |
|
|
|
window->GLX.visual->visual, |
|
|
|
visual->visual, |
|
|
|
AllocNone); |
|
|
|
AllocNone); |
|
|
|
|
|
|
|
|
|
|
|
// Create the actual window
|
|
|
|
// Create the actual window
|
|
|
@ -133,9 +134,9 @@ static GLboolean createWindow(_GLFWwindow* window, |
|
|
|
0, 0, // Upper left corner of this window on root
|
|
|
|
0, 0, // Upper left corner of this window on root
|
|
|
|
window->width, window->height, |
|
|
|
window->width, window->height, |
|
|
|
0, // Border width
|
|
|
|
0, // Border width
|
|
|
|
window->GLX.visual->depth, // Color depth
|
|
|
|
visual->depth, // Color depth
|
|
|
|
InputOutput, |
|
|
|
InputOutput, |
|
|
|
window->GLX.visual->visual, |
|
|
|
visual->visual, |
|
|
|
wamask, |
|
|
|
wamask, |
|
|
|
&wa |
|
|
|
&wa |
|
|
|
); |
|
|
|
); |
|
|
@ -979,12 +980,6 @@ void _glfwPlatformCloseWindow(_GLFWwindow* window) |
|
|
|
|
|
|
|
|
|
|
|
_glfwDestroyContext(window); |
|
|
|
_glfwDestroyContext(window); |
|
|
|
|
|
|
|
|
|
|
|
if (window->GLX.visual) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
XFree(window->GLX.visual); |
|
|
|
|
|
|
|
window->GLX.visual = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (window->X11.handle) |
|
|
|
if (window->X11.handle) |
|
|
|
{ |
|
|
|
{ |
|
|
|
XUnmapWindow(_glfwLibrary.X11.display, window->X11.handle); |
|
|
|
XUnmapWindow(_glfwLibrary.X11.display, window->X11.handle); |
|
|
|