- XSync(dpy, False);
- XCopyPlane(dpy, p0, window, window_gc, 0, 0, width, height, 0, 0, 1L);
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+ if (back_buf)
+ {
+ XdbeSwapInfo info[1];
+ info[0].swap_window = window;
+ info[0].swap_action = XdbeUndefined;
+ XCopyPlane (dpy, p0, back_buf, window_gc, 0, 0, width, height, 0, 0, 1L);
+ XdbeSwapBuffers (dpy, info, 1);
+ }
+ else
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+ XCopyPlane (dpy, p0, window, window_gc, 0, 0, width, height, 0, 0, 1L);
+