Correctly render containers when a split container is focused

This commit is contained in:
Michael Stapelberg
2011-08-26 03:17:41 +02:00
parent 194c220508
commit 7fca7f029f
3 changed files with 19 additions and 1 deletions

View File

@ -358,6 +358,18 @@ Con *con_inside_floating(Con *con) {
return con_inside_floating(con->parent);
}
/*
* Checks if the given container is inside a focused container.
*
*/
Con *con_inside_focused(Con *con) {
if (con == focused)
return true;
if (!con->parent)
return false;
return con_inside_focused(con->parent);
}
/*
* Returns the container with the given client window ID or NULL if no such
* container exists.