_con_move_to_con: focus_next isn't always con_next_focused(con)
con_next_focused uses con's parent. But since con can be inside an unfocused container this means that one of it's siblings could become focused in the current workspace.
This commit is contained in:
@ -27,6 +27,7 @@ sub kill_and_confirm_focus {
|
||||
}
|
||||
|
||||
my @windows;
|
||||
my $ws;
|
||||
|
||||
sub focus_windows {
|
||||
for (my $i = $#windows; $i >= 0; $i--) {
|
||||
@ -122,4 +123,22 @@ $windows[0] = open_window;
|
||||
cmd '[id=' . $windows[3]->id . '] move right';
|
||||
confirm_focus('split-v + unfocused move');
|
||||
|
||||
######################################################################
|
||||
# Test that moving an unfocused container from inside a split
|
||||
# container to another workspace doesn't focus sibling.
|
||||
######################################################################
|
||||
|
||||
$ws = fresh_workspace;
|
||||
$windows[0] = open_window;
|
||||
$windows[1] = open_window;
|
||||
cmd 'split v';
|
||||
open_window;
|
||||
cmd 'mark a';
|
||||
|
||||
cmd '[id=' . $windows[0]->id . '] focus';
|
||||
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');
|
||||
|
||||
done_testing;
|
||||
|
Reference in New Issue
Block a user