rem: data[0] = scr->current_workspace; data[1] = WFLAGS_NONE;  XChangeProperty(dpy, scr->root_win, _XA_WINDOWMAKER_STATE, _XA_WINDOWMAKER_STATE, 32, PropModeReplace, (unsigned char *) data, 2);
context: wScreenSaveState(WScreen *scr){    WWindow *wwin;    char *str;    WMPropList *old_state, *foo;    CARD32 data[2];    make_keys();    /* Save current workspace, so can go back to it upon restart. */    data[0] = scr->current_workspace;    data[1] = WFLAGS_NONE;    XChangeProperty(dpy, scr->root_win, _XA_WINDOWMAKER_STATE,                    _XA_WINDOWMAKER_STATE, 32, PropModeReplace,                    (unsigned char *) data, 2);    /* save state of windows */    wwin = scr->focused_window;    while (wwin) {        wWindowSaveState(wwin);        wwin = wwin->prev;    }    if (wPreferences.flags.noupdates)        return;    old_state = scr->session_state;    scr->session_state = WMCreatePLDictionary(NULL, NULL);    WMPLSetCaseSensitive(True);    /* save dock state to file */    if (!wPreferences.flags.nodock) {        wDockSaveState(scr, old_state);    } else {        if ((foo = WMGetFromPLDictionary(old_state, dDock))!=NULL) {            WMPutInPLDictionary(scr->session_state, dDock, foo);        }    }    if (!wPreferences.flags.noclip) {        wClipSaveState(scr);    } else {        if ((foo = WMGetFromPLDictionary(old_state, dClip))!=NULL) {            WMPutInPLDictionary(scr->session_state, dClip, foo);        }    }    wWorkspaceSaveState(scr, old_state);    if (wPreferences.save_session_on_exit) {        wSessionSaveState(scr);    } else {        if ((foo = WMGetFromPLDictionary(old_state, dApplications))!=NULL) {            WMPutInPLDictionary(scr->session_state, dApplications, foo);        }        if ((foo = WMGetFromPLDictionary(old_state, dWorkspace))!=NULL) {            WMPutInPLDictionary(scr->session_state, dWorkspace, foo);        }    }    /* clean up */    WMPLSetCaseSensitive(False);    wMenuSaveState(scr);    if (wScreenCount == 1) {        str = wdefaultspathfordomain("WMState");    } else {        char buf[16];        snprintf(buf, sizeof(buf), "WMState.%i", scr->screen);        str = wdefaultspathfordomain(buf);    }    if (!WMWritePropListToFile(scr->session_state, str, True)) {        wsyserror(_("could not save session state in %s"), str);    }    wfree(str);    WMReleasePropList(old_state);}