src/video/x11/SDL_x11opengl.c
changeset 7827 a03ec8de0426
parent 7723 aea98cc3e696
child 7853 4861edda71d1
     1.1 --- a/src/video/x11/SDL_x11opengl.c	Thu Oct 17 20:49:30 2013 -0700
     1.2 +++ b/src/video/x11/SDL_x11opengl.c	Fri Oct 18 01:36:41 2013 -0400
     1.3 @@ -320,16 +320,16 @@
     1.4      xattr.background_pixel = 0;
     1.5      xattr.border_pixel = 0;
     1.6      xattr.colormap =
     1.7 -        XCreateColormap(display, RootWindow(display, screen), vinfo->visual,
     1.8 +        X11_XCreateColormap(display, RootWindow(display, screen), vinfo->visual,
     1.9                          AllocNone);
    1.10 -    w = XCreateWindow(display, RootWindow(display, screen), 0, 0, 32, 32, 0,
    1.11 +    w = X11_XCreateWindow(display, RootWindow(display, screen), 0, 0, 32, 32, 0,
    1.12                        vinfo->depth, InputOutput, vinfo->visual,
    1.13                        (CWBackPixel | CWBorderPixel | CWColormap), &xattr);
    1.14      context = _this->gl_data->glXCreateContext(display, vinfo, NULL, True);
    1.15      if (context) {
    1.16          _this->gl_data->glXMakeCurrent(display, w, context);
    1.17      }
    1.18 -    XFree(vinfo);
    1.19 +    X11_XFree(vinfo);
    1.20  
    1.21      glXQueryExtensionsStringFunc =
    1.22          (const char *(*)(Display *, int)) X11_GL_GetProcAddress(_this,
    1.23 @@ -385,7 +385,7 @@
    1.24          _this->gl_data->glXMakeCurrent(display, None, NULL);
    1.25          _this->gl_data->glXDestroyContext(display, context);
    1.26      }
    1.27 -    XDestroyWindow(display, w);
    1.28 +    X11_XDestroyWindow(display, w);
    1.29      X11_PumpEvents(_this);
    1.30  }
    1.31  
    1.32 @@ -566,13 +566,13 @@
    1.33      }
    1.34  
    1.35      /* We do this to create a clean separation between X and GLX errors. */
    1.36 -    XSync(display, False);
    1.37 +    X11_XSync(display, False);
    1.38      errorBase = _this->gl_data->errorBase;
    1.39 -    handler = XSetErrorHandler(X11_GL_CreateContextErrorHandler);
    1.40 -    XGetWindowAttributes(display, data->xwindow, &xattr);
    1.41 +    handler = X11_XSetErrorHandler(X11_GL_CreateContextErrorHandler);
    1.42 +    X11_XGetWindowAttributes(display, data->xwindow, &xattr);
    1.43      v.screen = screen;
    1.44 -    v.visualid = XVisualIDFromVisual(xattr.visual);
    1.45 -    vinfo = XGetVisualInfo(display, VisualScreenMask | VisualIDMask, &v, &n);
    1.46 +    v.visualid = X11_XVisualIDFromVisual(xattr.visual);
    1.47 +    vinfo = X11_XGetVisualInfo(display, VisualScreenMask | VisualIDMask, &v, &n);
    1.48      if (vinfo) {
    1.49          if (_this->gl_config.major_version < 3 &&
    1.50              _this->gl_config.profile_mask == 0 &&
    1.51 @@ -656,10 +656,10 @@
    1.52                  }
    1.53              }
    1.54          }
    1.55 -        XFree(vinfo);
    1.56 +        X11_XFree(vinfo);
    1.57      }
    1.58 -    XSync(display, False);
    1.59 -    XSetErrorHandler(handler);
    1.60 +    X11_XSync(display, False);
    1.61 +    X11_XSetErrorHandler(handler);
    1.62  
    1.63      if (!context) {
    1.64          SDL_SetError("Could not create GL context");
    1.65 @@ -801,7 +801,7 @@
    1.66          return;
    1.67      }
    1.68      _this->gl_data->glXDestroyContext(display, glx_context);
    1.69 -    XSync(display, False);
    1.70 +    X11_XSync(display, False);
    1.71  }
    1.72  
    1.73  #endif /* SDL_VIDEO_OPENGL_GLX */