Update of /cvsroot/java-game-lib/LWJGL/src/native/linux
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13422/linux
Modified Files:
org_lwjgl_opengl_Window.cpp
Log Message:
Linux: Don't free colormap before the window is destroyed
Index: org_lwjgl_opengl_Window.cpp
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Window.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- org_lwjgl_opengl_Window.cpp 5 May 2004 14:28:38 -0000 1.42
+++ org_lwjgl_opengl_Window.cpp 10 May 2004 21:48:06 -0000 1.43
@@ -59,6 +59,7 @@
static GLXWindow glx_window;
static Atom delete_atom;
+static Colormap cmap;
static Window current_win;
static int current_screen;
static bool current_fullscreen;
@@ -246,7 +247,6 @@
Window root_win;
Window win;
XSetWindowAttributes attribs;
- Colormap cmap;
int attribmask;
current_screen = screen;
@@ -262,11 +262,11 @@
attribs.background_pixel = 0xFF000000;
attribmask = CWColormap | CWBackPixel | CWEventMask;
if (fullscreen || undecorated) {
+ printf("Depth: %d\n", vis_info->depth);
attribmask |= CWOverrideRedirect;
attribs.override_redirect = True;
}
win = XCreateWindow(getDisplay(), root_win, x, y, width, height, 0, vis_info->depth, InputOutput, vis_info->visual, attribmask, &attribs);
- XFreeColormap(getDisplay(), cmap);
printfDebug("Created window\n");
current_win = win;
Java_org_lwjgl_opengl_Window_nSetTitle(env, NULL, title);
@@ -289,6 +289,7 @@
static void destroyWindow() {
XDestroyWindow(getDisplay(), current_win);
+ XFreeColormap(getDisplay(), cmap);
}
int getCurrentScreen(void) {
|