i3 - improved tiling WM


Testcases: init pointer in a predictable position

Patch status: merged

Patch by Tony Crisci

Long description:

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.

To apply this patch, use:
curl http://cr.i3wm.org/patch/341/raw.patch | git am

b/testcases/lib/i3test.pm

17
@@ -155,6 +155,9 @@ __
18
     warnings->import;
19
 
20
     $x ||= i3test::X11->new;
21
+    # set the pointer to a predictable position in case a previous test has
22
+    # disturbed it
23
+    $x->root->warp_pointer(0, 0);
24
     $cv->recv if $i3_autostart;
25
 
26
     @_ = ($class);