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

@ -273,6 +273,11 @@ struct Con {
char *name;
/* a sticky-group is an identifier which bundles several containers to a
* group. The contents are shared between all of them, that is they are
* displayed on whichever of the containers is currently visible */
char *sticky_group;
/* user-definable mark to jump to this container later */
char *mark;

View File

@ -12,6 +12,19 @@
*/
void x_con_init(Con *con);
/**
* Moves a child window from Container src to Container dest.
*
*/
void x_move_win(Con *src, Con *dest);
/**
* Reparents the child window of the given container (necessary for sticky
* containers). The reparenting happens in the next call of x_push_changes().
*
*/
void x_reparent_child(Con *con, Con *old);
/**
* Re-initializes the associated X window state for this container. You have
* to call this when you assign a client to an empty container to ensure that