dri2: Refresh the fake front contents after glXSwapBuffers().
authorEric Anholt <eric@anholt.net>
Mon, 22 Jun 2009 23:33:29 +0000 (16:33 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 24 Jun 2009 02:31:12 +0000 (19:31 -0700)
Bug #19177.

Reviewed by: Ian Romanick <ian.d.romanick@intel.com>

src/glx/x11/dri2_glx.c

index fb31898db2d855c320be2aab78c6bb27be528e94..f4865aecb1c405a18b7c9faba435d08addb6b770 100644 (file)
@@ -80,6 +80,8 @@ struct __GLXDRIdrawablePrivateRec {
     int have_fake_front;
 };
 
+static void dri2WaitX(__GLXDRIdrawable *pdraw);
+
 static void dri2DestroyContext(__GLXDRIcontext *context,
                              __GLXscreenConfigs *psc, Display *dpy)
 {
@@ -215,6 +217,11 @@ static void dri2CopySubBuffer(__GLXDRIdrawable *pdraw,
     DRI2CopyRegion(pdraw->psc->dpy, pdraw->drawable, region,
                   DRI2BufferFrontLeft, DRI2BufferBackLeft);
     XFixesDestroyRegion(pdraw->psc->dpy, region);
+
+    /* Refresh the fake front (if present) after we just damaged the real
+     * front.
+     */
+    dri2WaitX(pdraw);
 }
 
 static void dri2SwapBuffers(__GLXDRIdrawable *pdraw)