copy[strlen(copy)-1] = '\0';
char *sep = strrchr(copy, '/');
- if (sep == NULL)
+ if (sep == NULL) {
+ FREE(copy);
return false;
+ }
*sep = '\0';
bool result = false;
if (mkdirp(copy))
dump_rect(gen, "geometry", con->geometry);
ystr("name");
- ystr(con->name);
+ if (con->window && con->window->name_json)
+ ystr(con->window->name_json);
+ else
+ ystr(con->name);
if (con->type == CT_WORKSPACE) {
ystr("num");
ystr("focus");
y(array_open);
- TAILQ_FOREACH(node, &(con->focus_head), nodes) {
+ TAILQ_FOREACH(node, &(con->focus_head), focused) {
y(integer, (long int)node);
}
y(array_close);