_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:
@ -141,4 +141,39 @@ cmd '[con_mark=a] move to workspace ' . get_unused_workspace;
|
||||
is(@{get_ws_content($ws)}, 2, 'Sanity check: marked window moved');
|
||||
confirm_focus('Move unfocused window from split container');
|
||||
|
||||
######################################################################
|
||||
# Moving containers to another workspace puts them on the top of the
|
||||
# focus stack but behind the focused container.
|
||||
######################################################################
|
||||
|
||||
for my $new_workspace (0 .. 1) {
|
||||
fresh_workspace;
|
||||
$windows[2] = open_window;
|
||||
$windows[1] = open_window;
|
||||
fresh_workspace if $new_workspace;
|
||||
$windows[3] = open_window;
|
||||
$windows[0] = open_window;
|
||||
cmd 'mark target';
|
||||
|
||||
cmd '[id=' . $windows[2]->id . '] move to mark target';
|
||||
cmd '[id=' . $windows[1]->id . '] move to mark target';
|
||||
confirm_focus('\'move to mark\' focus order' . ($new_workspace ? ' when moving containers from other workspace' : ''));
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# Same but with workspace commands.
|
||||
######################################################################
|
||||
|
||||
fresh_workspace;
|
||||
$windows[2] = open_window;
|
||||
$windows[1] = open_window;
|
||||
$ws = fresh_workspace;
|
||||
$windows[3] = open_window;
|
||||
$windows[0] = open_window;
|
||||
cmd 'mark target';
|
||||
|
||||
cmd '[id=' . $windows[2]->id . '] move to workspace ' . $ws;
|
||||
cmd '[id=' . $windows[1]->id . '] move to workspace ' . $ws;
|
||||
confirm_focus('\'move to workspace\' focus order when moving containers from other workspace');
|
||||
|
||||
done_testing;
|
||||
|
Reference in New Issue
Block a user