- my $left = open_window;
- my $right = open_window;
- sync_with_i3;
- my $con = $cv->recv;
- is($con->{window}, $right->{id}, 'focus is initially on the right container');
- reset_test;
-
- qx(xdotool mousemove 3 3 click 1);
- sync_with_i3;
- $con = $cv->recv;
- is($con->{window}, $left->{id}, 'button 1 moves focus left');
- reset_test;
-
- qx(xdotool mousemove 3 3 click 2);
- sync_with_i3;
- $con = $cv->recv;
- is($con->{window}, $right->{id}, 'button 2 moves focus right');
- reset_test;
-
- qx(xdotool mousemove 3 3 click 3);
- sync_with_i3;
- $con = $cv->recv;
- is($con->{window}, $left->{id}, 'button 3 moves focus left');
- reset_test;
-
- qx(xdotool mousemove 3 3 click 4);
- sync_with_i3;
- $con = $cv->recv;
- is($con->{window}, $right->{id}, 'button 4 moves focus right');
- reset_test;
-
- qx(xdotool mousemove 3 3 click 5);
- sync_with_i3;
- $con = $cv->recv;
- is($con->{window}, $left->{id}, 'button 5 moves focus left');
- reset_test;
-
- exit_gracefully($pid);
-
-}
+my $left = open_window;
+my $right = open_window;
+sync_with_i3;
+my $con = $cv->recv;
+is($con->{window}, $right->{id}, 'focus is initially on the right container');
+reset_test;
+
+xtest_button_press(1, 3, 3);
+xtest_button_release(1, 3, 3);
+sync_with_i3;
+$con = $cv->recv;
+is($con->{window}, $left->{id}, 'button 1 moves focus left');
+reset_test;
+
+xtest_button_press(2, 3, 3);
+xtest_button_release(2, 3, 3);
+sync_with_i3;
+$con = $cv->recv;
+is($con->{window}, $right->{id}, 'button 2 moves focus right');
+reset_test;
+
+xtest_button_press(3, 3, 3);
+xtest_button_release(3, 3, 3);
+sync_with_i3;
+$con = $cv->recv;
+is($con->{window}, $left->{id}, 'button 3 moves focus left');
+reset_test;
+
+xtest_button_press(4, 3, 3);
+xtest_button_release(4, 3, 3);
+sync_with_i3;
+$con = $cv->recv;
+is($con->{window}, $right->{id}, 'button 4 moves focus right');
+reset_test;
+
+xtest_button_press(5, 3, 3);
+xtest_button_release(5, 3, 3);
+sync_with_i3;
+$con = $cv->recv;
+is($con->{window}, $left->{id}, 'button 5 moves focus left');
+reset_test;
+
+exit_gracefully($pid);