- XCopyArea(X.d,i->qx->winbuf,i->qx->mywin,i->qx->gc, 0, 0, i->qx->lenx,i->qx->leny, 0, 0);
+#ifdef USE_PIXMAP
+# ifndef USE_SHM
+ if(i->qx->offscreen_pixmap) {
+ XFreePixmap(X.d,i->qx->offscreen_pixmap);i->qx->offscreen_pixmap = 0;
+ }
+ i->qx->offscreen_pixmap = XCreatePixmapFromBitmapData(X.d,i->qx->mywin,i->qx->currentscr,i->qx->lenx,i->qx->leny,X.white,X.black,DefaultDepth(X.d,X.s));
+# endif
+ XCopyArea(X.d,i->qx->offscreen_pixmap,i->qx->mywin,i->qx->gc, 0, 0, i->qx->lenx,i->qx->leny, 0, 0);