From: Michael Stapelberg Date: Wed, 15 Feb 2012 18:08:53 +0000 (+0000) Subject: tests: add test for previous commit X-Git-Tag: 4.2~74 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=19f3f84d293f01fd959cd1e37cf140ee65e4d964;p=i3%2Fi3 tests: add test for previous commit --- diff --git a/testcases/t/504-move-workspace-to-output.t b/testcases/t/504-move-workspace-to-output.t index 4a400698..7f6f990c 100644 --- a/testcases/t/504-move-workspace-to-output.t +++ b/testcases/t/504-move-workspace-to-output.t @@ -89,5 +89,23 @@ cmd 'move workspace to output left'; ($x0, $x1) = workspaces_per_screen(); ok('5' ~~ @$x0, 'workspace 5 back on xinerama-0'); +################################################################################ +# Verify that coordinates of floating windows are fixed correctly when moving a +# workspace to a different output. +################################################################################ + +cmd 'workspace 5'; +my $floating_window = open_floating_window; + +my $old_rect = $floating_window->rect; + +cmd 'move workspace to output right'; + +my $new_rect = $floating_window->rect; + +isnt($old_rect->{x}, $new_rect->{x}, 'x coordinate changed'); +is($old_rect->{y}, $new_rect->{y}, 'y coordinate unchanged'); +is($old_rect->{width}, $new_rect->{width}, 'width unchanged'); +is($old_rect->{height}, $new_rect->{height}, 'height unchanged'); done_testing;