+ XGrabServer(getXDisplay());
+
+ /* Clear out the old pixmap */
+ XGetWindowProperty(getXDisplay(), getScreenInfo(screen)->getRootWindow(),
+ rootpmap_id, 0L, 1L, False, AnyPropertyType,
+ &type, &format, &length, &after, &data);
+
+ if ((type == XA_PIXMAP) && (format == 32) && (length == 1)) {
+ XKillClient(getXDisplay(), *((Pixmap *)data));
+ XSync(getXDisplay(), False);
+ mode = PropModeReplace;
+ } else {
+ mode = PropModeAppend;
+ }
+ if (pixmap) {
+ XChangeProperty(getXDisplay(), getScreenInfo(screen)->getRootWindow(),
+ rootpmap_id, XA_PIXMAP, 32, mode,
+ (unsigned char *) &pixmap, 1);
+ } else {
+ XDeleteProperty(getXDisplay(), getScreenInfo(screen)->getRootWindow(),
+ rootpmap_id);