etnaviv: Use hash table to track BO indexes
[mesa.git] / src / glx / xfont.c
index 316c585ff3ab45b1cc7db7c8f9c8d13b7307dfd9..00498bc3ea4e7833cd8e46367cfcb33cde275e73 100644 (file)
@@ -222,6 +222,10 @@ DRI_glXUseXFont(struct glx_context *CC, Font font, int first, int count, int lis
    unsigned long valuemask;
    XFontStruct *fs;
 
+#if !defined(GLX_USE_APPLEGL)
+   __GLXDRIdrawable *glxdraw;
+#endif
+
    GLint swapbytes, lsbfirst, rowlength;
    GLint skiprows, skippixels, alignment;
 
@@ -233,6 +237,12 @@ DRI_glXUseXFont(struct glx_context *CC, Font font, int first, int count, int lis
    dpy = CC->currentDpy;
    win = CC->currentDrawable;
 
+#if !defined(GLX_USE_APPLEGL)
+   glxdraw = GetGLXDRIDrawable(CC->currentDpy, CC->currentDrawable);
+   if (glxdraw)
+      win = glxdraw->xDrawable;
+#endif
+
    fs = XQueryFont(dpy, font);
    if (!fs) {
       __glXSetError(CC, GL_INVALID_VALUE);