diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm index 591064c4..540e89bc 100644 --- a/testcases/lib/i3test.pm +++ b/testcases/lib/i3test.pm @@ -449,4 +449,14 @@ sub launch_with_config { return $pid; } +package i3test::X11; +use parent 'X11::XCB::Connection'; + +sub input_focus { + my $self = shift; + i3test::sync_with_i3($self); + + return $self->SUPER::input_focus(@_); +} + 1 diff --git a/testcases/t/170-force_focus_wrapping.t b/testcases/t/170-force_focus_wrapping.t index 48869c10..d2f15a65 100644 --- a/testcases/t/170-force_focus_wrapping.t +++ b/testcases/t/170-force_focus_wrapping.t @@ -6,18 +6,6 @@ # use i3test; -{ - package i3test::X11; - use parent 'X11::XCB::Connection'; - - sub input_focus { - my $self = shift; - i3test::sync_with_i3($self); - - return $self->SUPER::input_focus(@_); - } -} - my $x = i3test::X11->new; #####################################################################