_con_move_to_con: don't change focus when moving to active workspace

Seems to be the intention, indicated by this comment (con.c:1307-1309):
    /* For split containers, we use the currently focused container within it.
     * This allows setting marks on, e.g., tabbed containers which will move
     * con to a new tab behind the focused tab. */

Related to #3085.
This commit is contained in:
Orestis Floros
2018-03-25 04:45:19 +03:00
parent 45be56be33
commit 6d983b5ee0
3 changed files with 50 additions and 2 deletions

View File

@ -101,6 +101,12 @@ void output_push_sticky_windows(Con *to_focus) {
if (con_is_sticky(current)) {
bool ignore_focus = (to_focus == NULL) || (current != to_focus->parent);
con_move_to_workspace(current, visible_ws, true, false, ignore_focus);
if (!ignore_focus) {
Con *current_ws = con_get_workspace(focused);
con_activate(con_descend_focused(current));
/* Pushing sticky windows shouldn't change the focused workspace. */
con_activate(con_descend_focused(current_ws));
}
}
}
}