X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=testcases%2Ft%2F112-floating-resize.t;h=52817d709d0ed8784cfcb98ac51d6a8de41c0612;hp=ff3a1c04e0922cf3b3cd759b278f27894e2f8651;hb=a930994dc983190c9f43f262d496f97285604a76;hpb=db174234ce41c3ac317ef25d5fff323540295e9a diff --git a/testcases/t/112-floating-resize.t b/testcases/t/112-floating-resize.t index ff3a1c04..52817d70 100644 --- a/testcases/t/112-floating-resize.t +++ b/testcases/t/112-floating-resize.t @@ -55,4 +55,22 @@ cmd 'border 1pixel'; test_resize; +################################################################################ +# Check if we can position a floating window out of bounds. The XDummy screen +# is 1280x1024, so x=2864, y=893 is out of bounds. +################################################################################ + +($a, $t) = $window->rect; +$window->rect(X11::XCB::Rect->new( + x => 2864, + y => 893, + width => $a->width, + height => $a->height)); + +sync_with_i3; + +($a, $t) = $window->rect; +cmp_ok($a->x, '<', 1280, 'X not moved out of bounds'); +cmp_ok($a->y, '<', 1024, 'Y not moved out of bounds'); + done_testing;