Bugfix: Don’t focus new cons when there is a fullscreen con (Thanks dothebart)

Also, remove the focus_it parameter from tree_open_con, it makes more sense to
call con_focus outside of the function.
This commit is contained in:
Michael Stapelberg
2011-03-06 23:26:02 +01:00
parent 8ce5f2a21b
commit 287d7f9527
4 changed files with 23 additions and 17 deletions

View File

@ -55,7 +55,7 @@ void tree_init() {
* Opens an empty container in the current container
*
*/
Con *tree_open_con(Con *con, bool focus_it) {
Con *tree_open_con(Con *con) {
if (con == NULL) {
/* every focusable Con has a parent (outputs have parent root) */
con = focused->parent;
@ -80,10 +80,6 @@ Con *tree_open_con(Con *con, bool focus_it) {
/* 4: re-calculate child->percent for each child */
con_fix_percent(con);
/* 5: focus the new container */
if (focus_it)
con_focus(new);
return new;
}