Implement sticky windows

The implementation works like this:
Containers can have a 'sticky-group' attribute. Imagine two different
containers (on two different workspaces) which have the same sticky-group.
Now you open a window in the first container. When you switch to the
other workspace, the window will be re-assigned to the other container.

An obvious problem which is not covered with the code at the moment is
having two containers with the same sticky-group visible at the same time.
This commit is contained in:
Michael Stapelberg
2010-09-01 18:11:01 +02:00
parent 4d12e18571
commit 0925e8b7dc
5 changed files with 174 additions and 1 deletions

View File

@ -71,6 +71,10 @@ static int json_string(void *ctx, const unsigned char *val, unsigned int len) {
if (strcasecmp(last_key, "name") == 0) {
json_node->name = scalloc((len+1) * sizeof(char));
memcpy(json_node->name, val, len);
} else if (strcasecmp(last_key, "sticky_group") == 0) {
json_node->sticky_group = scalloc((len+1) * sizeof(char));
memcpy(json_node->sticky_group, val, len);
LOG("sticky_group of this container is %s\n", json_node->sticky_group);
}
}
return 1;