Handle _NET_WM_STATE_STICKY, but only for floating containers. If this atom is set, the floating window will always be automatically moved to the currently active workspace of the output that it is on. This is the equivalent of a sticky note stuck to the monitor.
We will respect this atom upon managing a window as well as when we receive a request that changes the sticky state. fixes #1455
This commit is contained in:
17
src/con.c
17
src/con.c
@ -284,6 +284,23 @@ bool con_is_hidden(Con *con) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns whether the container or any of its children is sticky.
|
||||
*
|
||||
*/
|
||||
bool con_is_sticky(Con *con) {
|
||||
if (con->sticky)
|
||||
return true;
|
||||
|
||||
Con *child;
|
||||
TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
|
||||
if (con_is_sticky(child))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns true if this node accepts a window (if the node swallows windows,
|
||||
* it might already have swallowed enough and cannot hold any more).
|
||||
|
Reference in New Issue
Block a user