Bugfix: Ignore ConfigureRequests with out-of-bound coordinates (+test)

JDownloader seems to use these for its captcha popups when focus is not on the
same workspace, for some weird reason.
This commit is contained in:
Michael Stapelberg
2011-12-17 17:15:52 +00:00
parent fcfdfedcb5
commit 75c57c4eef
2 changed files with 49 additions and 11 deletions

View File

@ -62,4 +62,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;