diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index baa6706d6..d33b0d1b0 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -118,7 +118,7 @@ DRI2GetDrawable(DrawablePtr pDraw) WindowPtr pWin; PixmapPtr pPixmap; - if (pDraw->type == DRAWABLE_WINDOW) { + if (WindowDrawable(pDraw->type)) { pWin = (WindowPtr) pDraw; return dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); } else { @@ -161,7 +161,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw) pPriv->last_swap_ust = 0; list_init(&pPriv->reference_list); - if (pDraw->type == DRAWABLE_WINDOW) { + if (WindowDrawable(pDraw->type)) { pWin = (WindowPtr) pDraw; dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, pPriv); } else { @@ -272,7 +272,7 @@ static int DRI2DrawableGone(pointer p, XID id) return Success; pDraw = pPriv->drawable; - if (pDraw->type == DRAWABLE_WINDOW) { + if (WindowDrawable(pDraw->type)) { pWin = (WindowPtr) pDraw; dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, NULL); } else { @@ -411,12 +411,12 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, need_real_front--; front_format = format; - if (pDraw->type == DRAWABLE_WINDOW) { + if (WindowDrawable(pDraw->type)) { need_fake_front++; } } - if (pDraw->type == DRAWABLE_WINDOW) { + if (WindowDrawable(pDraw->type)) { if (attachment == DRI2BufferFakeFrontLeft) { need_fake_front--; have_fake_front = 1;