add: if (old_state) { int i; proplist_t tmp;  keys = PLGetAllDictionaryKeys(old_state); for (i = 0; i < PLGetNumberOfElements(keys); i++) { tmp = PLGetArrayElement(keys, i);  if (strncasecmp(PLGetString(tmp), "applications", 12) == 0 && !PLGetDictionaryEntry(dock_state, tmp)) {  PLInsertDictionaryEntry(dock_state, tmp, PLGetDictionaryEntry(old_state, tmp)); } } PLRelease(keys); }
context: wDockSaveState(WScreen *scr){    proplist_t dock_state;    dock_state = dockSaveState(scr->dock);    PLInsertDictionaryEntry(scr->session_state, dDock, dock_state);    PLRelease(dock_state);}