From 2772c377ec36b3c47d81e431e433b91f13d2b32f Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Sat, 21 Mar 2015 22:22:37 +0100
Subject: [PATCH] increase timeouts for travis

See https://travis-ci.org/i3/i3/jobs/55319961 (line 4064) for a job
where the window could not be mapped within 2 seconds.
---
 testcases/lib/i3test.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm
index 212e78fd..c149cbd1 100644
--- a/testcases/lib/i3test.pm
+++ b/testcases/lib/i3test.pm
@@ -226,7 +226,7 @@ you might have to map it on your own and use this function:
 sub wait_for_map {
     my ($win) = @_;
     my $id = (blessed($win) && $win->isa('X11::XCB::Window')) ? $win->id : $win;
-    wait_for_event 2, sub {
+    wait_for_event 4, sub {
         $_[0]->{response_type} == MAP_NOTIFY and $_[0]->{window} == $id
     };
 }
@@ -248,7 +248,7 @@ event.
 sub wait_for_unmap {
     my ($win) = @_;
     # my $id = (blessed($win) && $win->isa('X11::XCB::Window')) ? $win->id : $win;
-    wait_for_event 2, sub {
+    wait_for_event 4, sub {
         $_[0]->{response_type} == UNMAP_NOTIFY # and $_[0]->{window} == $id
     };
     sync_with_i3();
@@ -718,7 +718,7 @@ sub sync_with_i3 {
     return $myrnd if $args{dont_wait_for_event};
 
     # now wait until the reply is here
-    return wait_for_event 2, sub {
+    return wait_for_event 4, sub {
         my ($event) = @_;
         # TODO: const
         return 0 unless $event->{response_type} == 161;