Fix output retrieval for floating cons

When focusing/moving to outputs, the method of getting the correct
output for a given container fails if the container in question is
floating and only partially mapped on an output screen. This patch
introduces a fail-safe retrieval of the output for any container.
This commit is contained in:
jj
2013-10-22 13:17:23 +02:00
committed by Michael Stapelberg
parent 1110a1bed6
commit b6100dd727
2 changed files with 31 additions and 4 deletions

View File

@ -71,6 +71,23 @@ is(focused_output, 'fake-1', 'focus on second output');
cmd 'focus output fake-0';
is(focused_output, 'fake-0', 'focus on first output');
################################################################################
# use 'focus output' and verify that i3 does not crash when the currently
# focused window is floating and is only partially mapped on an output screen
################################################################################
is(focused_output, 'fake-0', 'focus on first output');
my $floating_win = open_window;
cmd 'floating toggle';
cmd 'move to absolute position -10 -10';
cmd 'focus output right';
is(focused_output, 'fake-1', 'focus on second output');
cmd 'focus output fake-0';
is(focused_output, 'fake-0', 'focus on first output');
exit_gracefully($pid);
done_testing;