void setcurrentdesktop(void) { long data[] = { 0 }; XChangeProperty(dpy, root, netatom[NetCurrentDesktop], XA_CARDINAL, 32, PropModeReplace, (unsigned char *)data, 1); } void setdesktopnames(void) { int i; XTextProperty text; char *tags[NUMTAGS]; for (i = 0; i < NUMTAGS; i++) tags[i] = tagicon(selmon, i); Xutf8TextListToTextProperty(dpy, tags, NUMTAGS, XUTF8StringStyle, &text); XSetTextProperty(dpy, root, &text, netatom[NetDesktopNames]); } void setfloatinghint(Client *c) { Atom target = XInternAtom(dpy, "_IS_FLOATING", 0); unsigned int floating[1] = {c->isfloating}; XChangeProperty(dpy, c->win, target, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)floating, 1); } void setnumdesktops(void) { long data[] = { NUMTAGS }; XChangeProperty(dpy, root, netatom[NetNumberOfDesktops], XA_CARDINAL, 32, PropModeReplace, (unsigned char *)data, 1); } void setviewport(void) { long data[] = { 0, 0 }; XChangeProperty(dpy, root, netatom[NetDesktopViewport], XA_CARDINAL, 32, PropModeReplace, (unsigned char *)data, 2); } void updatecurrentdesktop(void) { long rawdata[] = { selmon->tagset[selmon->seltags] }; int i = 0; while (*rawdata >> (i + 1)) { i++; } long data[] = { i }; XChangeProperty(dpy, root, netatom[NetCurrentDesktop], XA_CARDINAL, 32, PropModeReplace, (unsigned char *)data, 1); }