rem: if (type_ret==_XA_WINDOWMAKER_STATE)
add: *state = malloc(sizeof(WSavedState));  if (*state) { (*state)->workspace = data[0]; (*state)->miniaturized = data[1]; (*state)->shaded = data[2]; (*state)->hidden = data[3]; (*state)->use_geometry = data[4]; (*state)->x = data[5]; (*state)->y = data[6]; (*state)->w = data[7]; (*state)->h = data[8]; } XFree(data);  if (*state && type_ret==_XA_WINDOWMAKER_STATE)
context: getSavedState(Window window, WSavedState **state){    Atom type_ret;    int fmt_ret;    unsigned long nitems_ret;    unsigned long bytes_after_ret;        if (XGetWindowProperty(dpy, window, _XA_WINDOWMAKER_STATE, 0, 			   sizeof(WSavedState), 			   True, _XA_WINDOWMAKER_STATE,			   &type_ret, &fmt_ret, &nitems_ret, &bytes_after_ret,			   (unsigned char **)state)!=Success)      return 0;    if (type_ret==_XA_WINDOWMAKER_STATE)      return 1;    else       return 0;}