Remove special handling of floating containers in con_next_focused

Explanation for the changed test:
After $third is switched to floating, the test moves focus to $second.
So, the parent of $second (the stacked container) is above $third in the
focus stack and it's children ($first, $second) should get focused
before $second. When $second is switched to floating the correct focus
order for the workspace should be $second->parent (floating con is the
parent) > $first->parent (stacked con) > $third.

Fixes #1975
This commit is contained in:
Orestis Floros
2017-09-25 14:00:43 +03:00
parent 2c6da57e81
commit 791e407fd3
3 changed files with 40 additions and 44 deletions

View File

@ -105,18 +105,14 @@ cmd 'split v';
cmd 'layout stacked';
$second = open_window({ background_color => '#00ff00' }); # window 6
$third = open_window({ background_color => '#0000ff' }); # window 7
is($x->input_focus, $third->id, 'last container focused');
cmd 'floating enable';
cmd '[id="' . $second->id . '"] focus';
is($x->input_focus, $second->id, 'second con focused');
cmd 'floating enable';
cmd '[id="' . $third->id . '"] floating enable';
sync_with_i3;
is($x->input_focus, $second->id, 'second con focused');
# now kill the second one. focus should fall back to the third one, which is
# also floating