<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - GLX_INTEL_swap_event crashes driver when swapping window buffers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=54372#c22">Comment # 22</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - GLX_INTEL_swap_event crashes driver when swapping window buffers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=54372">bug 54372</a>
              from <span class="vcard"><a class="email" href="mailto:danmanj@gmail.com" title="danmanj@gmail.com">danmanj@gmail.com</a>
</span></b>
        <pre>Ok, so this patch fixes glxUseXFont for glxwindows.

Any idea when these patches will go in?


diff --git a/src/glx/xfont.c b/src/glx/xfont.c
index 316c585..3c34b1d 100644
--- a/src/glx/xfont.c
+++ b/src/glx/xfont.c
@@ -221,6 +221,7 @@ DRI_glXUseXFont(struct glx_context *CC, Font font, int
first, int count, int lis
    XGCValues values;
    unsigned long valuemask;
    XFontStruct *fs;
+   __GLXDRIdrawable *wtf;

    GLint swapbytes, lsbfirst, rowlength;
    GLint skiprows, skippixels, alignment;
@@ -233,6 +234,10 @@ DRI_glXUseXFont(struct glx_context *CC, Font font, int
first, int count, int lis
    dpy = CC->currentDpy;
    win = CC->currentDrawable;

+   wtf = GetGLXDRIDrawable(CC->currentDpy, CC->currentDrawable);
+   if(wtf)
+          win = wtf->xDrawable;
+
    fs = XQueryFont(dpy, font);
    if (!fs) {
       __glXSetError(CC, GL_INVALID_VALUE);</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>