XCopyPlane (dpy, pixmap, window, copy_gc, 0,0,width,height,width,height, 1);
if (buffer)
XCopyPlane (dpy, buffer, window, copy_gc, 0,0,width,height,0,height, 1);
XCopyPlane (dpy, pixmap, window, copy_gc, 0,0,width,height,width,height, 1);
if (buffer)
XCopyPlane (dpy, buffer, window, copy_gc, 0,0,width,height,0,height, 1);