From 19f3f84d293f01fd959cd1e37cf140ee65e4d964 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 15 Feb 2012 18:08:53 +0000 Subject: [PATCH] tests: add test for previous commit --- testcases/t/504-move-workspace-to-output.t | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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; -- 2.39.5