]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/163-wm-state.t
testcases: use $x in wait_for_(un)map change to wait_for_(un)map($win)
[i3/i3] / testcases / t / 163-wm-state.t
index e55d86824de934d97cab3fb0b21f5773618c3e0d..f3e7e2d17c632fa55964b650afb9d91c595ad868 100644 (file)
@@ -4,10 +4,8 @@
 # Tests if WM_STATE is WM_STATE_NORMAL when mapped and WM_STATE_WITHDRAWN when
 # unmapped.
 #
-use X11::XCB qw(:all);
 use i3test;
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB qw(ICCCM_WM_STATE_NORMAL ICCCM_WM_STATE_WITHDRAWN);
 
 my $window = open_window($x);
 
@@ -17,7 +15,7 @@ is($window->state, ICCCM_WM_STATE_NORMAL, 'WM_STATE normal');
 
 $window->unmap;
 
-wait_for_unmap $x;
+wait_for_unmap $window;
 
 is($window->state, ICCCM_WM_STATE_WITHDRAWN, 'WM_STATE withdrawn');