summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glx/xfont.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glx/xfont.c b/src/glx/xfont.c
index 316c585ff3a..a086b7a03ef 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 *glxdraw;
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;
+ glxdraw = GetGLXDRIDrawable(CC->currentDpy, CC->currentDrawable);
+ if (glxdraw)
+ win = glxdraw->xDrawable;
+
fs = XQueryFont(dpy, font);
if (!fs) {
__glXSetError(CC, GL_INVALID_VALUE);