- if (XGetWindowProperty (dpy, root, XInternAtom (dpy, "_XROOTPMAP_ID", False),
+ if (XGetWindowProperty (dpy, root, XInternAtom (dpy, BACKGROUND_PROP, False),
0, 4, False, AnyPropertyType,
&actual_type, &actual_format, &nitems, &bytes_after, &prop) == Success &&
actual_type == XInternAtom (dpy, "PIXMAP", False) && actual_format == 32 && nitems == 1)
0, 4, False, AnyPropertyType,
&actual_type, &actual_format, &nitems, &bytes_after, &prop) == Success &&
actual_type == XInternAtom (dpy, "PIXMAP", False) && actual_format == 32 && nitems == 1)
- XSelectInput (dpy, root, SubstructureNotifyMask|ExposureMask|StructureNotifyMask);
+ XSelectInput (dpy, root,
+ SubstructureNotifyMask|
+ ExposureMask|
+ StructureNotifyMask|
+ PropertyChangeMask);
XQueryTree (dpy, root, &root_return, &parent_return, &children, &nchildren);
for (i = 0; i < nchildren; i++)
add_win (dpy, children[i], i ? children[i-1] : None);
XQueryTree (dpy, root, &root_return, &parent_return, &children, &nchildren);
for (i = 0; i < nchildren; i++)
add_win (dpy, children[i], i ? children[i-1] : None);
+ case PropertyNotify:
+ if (ev.xproperty.atom == XInternAtom (dpy, BACKGROUND_PROP, False))
+ {
+ if (rootTile)
+ {
+ XClearArea (dpy, root, 0, 0, 0, 0, True);
+ XRenderFreePicture (dpy, rootTile);
+ rootTile = None;
+ }
+ }
+ break;
default:
if (ev.type == damage_event + XDamageNotify)
damage_win (dpy, (XDamageNotifyEvent *) &ev);
default:
if (ev.type == damage_event + XDamageNotify)
damage_win (dpy, (XDamageNotifyEvent *) &ev);