-#ifdef HAVE_XDBE_EXTENSION
-if (get_string_resource("dbuf","String")!=NULL && get_string_resource("dbuf","String")[0]!=0) usedouble=True;
-if (usedouble)
- {
- XdbeQueryExtension(dpy,&n,&i);
- if (n==0 && i==0)
- {
- fprintf(stderr,"Double buffer extension not supported!\n");
- usedouble=False;
- }
- }
-if (usedouble) win[1]=XdbeAllocateBackBufferName(dpy,win[0],XdbeUndefined);
-#endif /* HAVE_XDBE_EXTENSION */
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+ usedouble = True;
+ win[1] = xdbe_get_backbuffer (dpy, win[0], XdbeUndefined);
+ if (!win[1])
+ {
+ usedouble = False;
+ win[1] = win[0];
+ }
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */