apple: Change from XExtDisplayInfo to struct glx_display
authorJeremy Huddleston <jeremyhu@apple.com>
Sun, 5 Jun 2011 23:26:19 +0000 (19:26 -0400)
committerJeremy Huddleston <jeremyhu@apple.com>
Mon, 6 Jun 2011 00:52:14 +0000 (20:52 -0400)
Fixes regression introduced by: ab434f6b7641a64d30725a9ac24929240362d466 and
                                c356f5867f2c1fad7155df538b9affa8dbdcf869

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
src/glx/apple/glx_error.c

index b3a071c307b5d920824bab57700c37f8e83c76de..d44a80ca6592ae17475c4ace69c50831f95d4b0b 100644 (file)
  prior written authorization.
 */
 #include <stdbool.h>
+#include <assert.h>
 #include <X11/Xlibint.h>
 #include <X11/extensions/extutil.h>
 #include <X11/extensions/Xext.h>
 #include "glxclient.h"
 #include "glx_error.h"
 
-extern XExtDisplayInfo *__glXFindDisplay(Display * dpy);
-
 void
 __glXSendError(Display * dpy, int errorCode, unsigned long resourceID,
                unsigned long minorCode, bool coreX11error)
 {
-   XExtDisplayInfo *info = __glXFindDisplay(dpy);
+   struct glx_display *glx_dpy = __glXInitialize(dpy);
    struct glx_context *gc = __glXGetCurrentContext();
    xError error;
 
+   assert(glx_dpy);
+   assert(gc);
+
    LockDisplay(dpy);
 
    error.type = X_Error;
@@ -51,7 +53,7 @@ __glXSendError(Display * dpy, int errorCode, unsigned long resourceID,
       error.errorCode = errorCode;
    }
    else {
-      error.errorCode = info->codes->first_error + errorCode;
+      error.errorCode = glx_dpy->codes->first_error + errorCode;
    }
 
    error.sequenceNumber = dpy->request;