From: Tony Crisci Date: Mon, 2 Dec 2013 23:06:19 +0000 (-0500) Subject: Testcases: init pointer in a predictable position X-Git-Tag: 4.7~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1b640ae3bea048f971de6a33192a3f37e0700188;p=i3%2Fi3 Testcases: init pointer in a predictable position Tests may disturb the pointer in their normal operation that may lead to unexpected results in later tests using that display. Reset the pointer before a test begins to (0, 0) to save test developers from related "gotchas" and reduce multi-monitor test boilerplate. --- diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm index 476cda03..414362ae 100644 --- a/testcases/lib/i3test.pm +++ b/testcases/lib/i3test.pm @@ -155,6 +155,9 @@ __ warnings->import; $x ||= i3test::X11->new; + # set the pointer to a predictable position in case a previous test has + # disturbed it + $x->root->warp_pointer(0, 0); $cv->recv if $i3_autostart; @_ = ($class);