testcases: don't sync_with_i3() before $x->input_focus

since input_focus calls it anyways
This commit is contained in:
Maik Fischer 2011-11-22 01:27:08 +01:00 committed by Michael Stapelberg
parent 0702f1fb7b
commit 3a9d94bba4
11 changed files with 0 additions and 51 deletions

View File

@ -173,8 +173,6 @@ sub open_window {
$window->map; $window->map;
wait_for_map($window); wait_for_map($window);
# We sync with i3 here to make sure $x->input_focus is updated.
sync_with_i3();
return $window; return $window;
} }

View File

@ -25,7 +25,6 @@ sub focus_after {
my $msg = shift; my $msg = shift;
cmd $msg; cmd $msg;
sync_with_i3;
return $x->input_focus; return $x->input_focus;
} }

View File

@ -24,7 +24,6 @@ sub focus_after {
my $msg = shift; my $msg = shift;
cmd $msg; cmd $msg;
sync_with_i3;
return $x->input_focus; return $x->input_focus;
} }

View File

@ -36,8 +36,6 @@ cmd 'floating enable';
cmd '[id="' . $second->id . '"] focus'; cmd '[id="' . $second->id . '"] focus';
sync_with_i3;
is($x->input_focus, $second->id, 'second con focused'); is($x->input_focus, $second->id, 'second con focused');
cmd 'floating enable'; cmd 'floating enable';
@ -67,8 +65,6 @@ cmd 'floating enable';
cmd '[id="' . $second->id . '"] focus'; cmd '[id="' . $second->id . '"] focus';
sync_with_i3;
is($x->input_focus, $second->id, 'second con focused'); is($x->input_focus, $second->id, 'second con focused');
cmd 'floating enable'; cmd 'floating enable';
@ -103,8 +99,6 @@ cmd 'floating enable';
cmd '[id="' . $second->id . '"] focus'; cmd '[id="' . $second->id . '"] focus';
sync_with_i3;
is($x->input_focus, $second->id, 'second con focused'); is($x->input_focus, $second->id, 'second con focused');
cmd 'floating enable'; cmd 'floating enable';
@ -132,8 +126,6 @@ $tmp = fresh_workspace;
$first = open_window({ background_color => '#ff0000' }); # window 8 $first = open_window({ background_color => '#ff0000' }); # window 8
$second = open_window({ background_color => '#00ff00' }); # window 9 $second = open_window({ background_color => '#00ff00' }); # window 9
sync_with_i3;
is($x->input_focus, $second->id, 'second container focused'); is($x->input_focus, $second->id, 'second container focused');
cmd 'floating enable'; cmd 'floating enable';
@ -142,32 +134,22 @@ is($x->input_focus, $second->id, 'second container focused');
cmd 'focus tiling'; cmd 'focus tiling';
sync_with_i3;
is($x->input_focus, $first->id, 'first (tiling) container focused'); is($x->input_focus, $first->id, 'first (tiling) container focused');
cmd 'focus floating'; cmd 'focus floating';
sync_with_i3;
is($x->input_focus, $second->id, 'second (floating) container focused'); is($x->input_focus, $second->id, 'second (floating) container focused');
cmd 'focus floating'; cmd 'focus floating';
sync_with_i3;
is($x->input_focus, $second->id, 'second (floating) container still focused'); is($x->input_focus, $second->id, 'second (floating) container still focused');
cmd 'focus mode_toggle'; cmd 'focus mode_toggle';
sync_with_i3;
is($x->input_focus, $first->id, 'first (tiling) container focused'); is($x->input_focus, $first->id, 'first (tiling) container focused');
cmd 'focus mode_toggle'; cmd 'focus mode_toggle';
sync_with_i3;
is($x->input_focus, $second->id, 'second (floating) container focused'); is($x->input_focus, $second->id, 'second (floating) container focused');
############################################################################# #############################################################################
@ -180,38 +162,26 @@ $first = open_floating_window({ background_color => '#ff0000' });# window 10
$second = open_floating_window({ background_color => '#00ff00' }); # window 11 $second = open_floating_window({ background_color => '#00ff00' }); # window 11
$third = open_floating_window({ background_color => '#0000ff' }); # window 12 $third = open_floating_window({ background_color => '#0000ff' }); # window 12
sync_with_i3;
is($x->input_focus, $third->id, 'third container focused'); is($x->input_focus, $third->id, 'third container focused');
cmd 'focus left'; cmd 'focus left';
sync_with_i3;
is($x->input_focus, $second->id, 'second container focused'); is($x->input_focus, $second->id, 'second container focused');
cmd 'focus left'; cmd 'focus left';
sync_with_i3;
is($x->input_focus, $first->id, 'first container focused'); is($x->input_focus, $first->id, 'first container focused');
cmd 'focus left'; cmd 'focus left';
sync_with_i3;
is($x->input_focus, $third->id, 'focus wrapped to third container'); is($x->input_focus, $third->id, 'focus wrapped to third container');
cmd 'focus right'; cmd 'focus right';
sync_with_i3;
is($x->input_focus, $first->id, 'focus wrapped to first container'); is($x->input_focus, $first->id, 'focus wrapped to first container');
cmd 'focus right'; cmd 'focus right';
sync_with_i3;
is($x->input_focus, $second->id, 'focus on second container'); is($x->input_focus, $second->id, 'focus on second container');
done_testing; done_testing;

View File

@ -22,8 +22,6 @@ my $left = open_window;
my $mid = open_window; my $mid = open_window;
my $right = open_window; my $right = open_window;
sync_with_i3;
diag("left = " . $left->id . ", mid = " . $mid->id . ", right = " . $right->id); diag("left = " . $left->id . ", mid = " . $mid->id . ", right = " . $right->id);
is($x->input_focus, $right->id, 'Right window focused'); is($x->input_focus, $right->id, 'Right window focused');

View File

@ -10,8 +10,6 @@ cmd 'split v';
my $top = open_window; my $top = open_window;
my $bottom = open_window; my $bottom = open_window;
sync_with_i3;
diag("top = " . $top->id . ", bottom = " . $bottom->id); diag("top = " . $top->id . ", bottom = " . $bottom->id);
is($x->input_focus, $bottom->id, 'Bottom window focused'); is($x->input_focus, $bottom->id, 'Bottom window focused');

View File

@ -57,9 +57,6 @@ my $tmp2 = get_unused_workspace;
cmd "move workspace $tmp2"; cmd "move workspace $tmp2";
# verify that the third window has the focus # verify that the third window has the focus
sync_with_i3;
is($x->input_focus, $third->id, 'third window focused'); is($x->input_focus, $third->id, 'third window focused');
done_testing; done_testing;

View File

@ -9,8 +9,6 @@ use X11::XCB qw(ICCCM_WM_STATE_NORMAL ICCCM_WM_STATE_WITHDRAWN);
my $window = open_window; my $window = open_window;
sync_with_i3;
is($window->state, ICCCM_WM_STATE_NORMAL, 'WM_STATE normal'); is($window->state, ICCCM_WM_STATE_NORMAL, 'WM_STATE normal');
$window->unmap; $window->unmap;

View File

@ -14,8 +14,6 @@ sub two_windows {
my $first = open_window; my $first = open_window;
my $second = open_window; my $second = open_window;
sync_with_i3;
is($x->input_focus, $second->id, 'second window focused'); is($x->input_focus, $second->id, 'second window focused');
ok(@{get_ws_content($tmp)} == 2, 'two containers opened'); ok(@{get_ws_content($tmp)} == 2, 'two containers opened');

View File

@ -26,8 +26,6 @@ ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
my $first = open_window; my $first = open_window;
my $second = open_window; my $second = open_window;
sync_with_i3;
is($x->input_focus, $second->id, 'second window focused'); is($x->input_focus, $second->id, 'second window focused');
my @content = @{get_ws_content($tmp)}; my @content = @{get_ws_content($tmp)};
ok(@content == 2, 'two containers opened'); ok(@content == 2, 'two containers opened');
@ -56,8 +54,6 @@ ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
$first = open_window; $first = open_window;
$second = open_window; $second = open_window;
sync_with_i3;
is($x->input_focus, $second->id, 'second window focused'); is($x->input_focus, $second->id, 'second window focused');
@content = @{get_ws_content($tmp)}; @content = @{get_ws_content($tmp)};
ok(@content == 1, 'one con at workspace level'); ok(@content == 1, 'one con at workspace level');

View File

@ -70,8 +70,6 @@ cmd 'focus parent';
$third = open_window; $third = open_window;
sync_with_i3;
is($x->input_focus, $third->id, 'third window focused'); is($x->input_focus, $third->id, 'third window focused');
cmd 'focus left'; cmd 'focus left';