call glFinish if drawing to front buffer
diff --git a/progs/demos/drawpix.c b/progs/demos/drawpix.c
index 82d32b0..d2f5748 100644
--- a/progs/demos/drawpix.c
+++ b/progs/demos/drawpix.c
@@ -71,7 +71,9 @@
    glDisable(GL_SCISSOR_TEST);
    glDisable(GL_FOG);
 
-   if (!DrawFront)
+   if (DrawFront)
+      glFinish();
+   else
       glutSwapBuffers();
 }