Restrict directional focus in fullscreen.

This reuses the same fullscreen focus logic to ensure that focus
doesn't escape a fullscreen container.
This commit is contained in:
Fernando Tarlá Cardoso Lemos
2012-05-26 19:53:02 -03:00
committed by Michael Stapelberg
parent 250c260eaa
commit 8bf4e9e059
2 changed files with 77 additions and 0 deletions

View File

@ -556,6 +556,10 @@ static bool _tree_next(Con *con, char way, orientation_t orientation, bool wrap)
else next = TAILQ_LAST(&(parent->nodes_head), nodes_head);
}
/* Don't violate fullscreen focus restrictions. */
if (!con_fullscreen_permits_focusing(next))
return false;
/* 3: focus choice comes in here. at the moment we will go down
* until we find a window */
/* TODO: check for window, atm we only go down as far as possible */