X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F158-wm_take_focus.t;h=b8dae3b1b1d0b6e84f19bd6b4bc9ea170860e0e1;hb=e89f39158974e4d68491a8dcd471f6ee70f5b46f;hp=050e11623f95e250b4bfe6e7fe0e15e4c1261a47;hpb=c2ccfc7e6088153c3846ea6b525cd41a6606ae72;p=i3%2Fi3 diff --git a/testcases/t/158-wm_take_focus.t b/testcases/t/158-wm_take_focus.t index 050e1162..b8dae3b1 100644 --- a/testcases/t/158-wm_take_focus.t +++ b/testcases/t/158-wm_take_focus.t @@ -50,12 +50,15 @@ sub recv_take_focus { } subtest 'Window without WM_TAKE_FOCUS', sub { - fresh_workspace; + my $ws = fresh_workspace; my $window = open_window; ok(!recv_take_focus($window), 'did not receive ClientMessage'); + my $con = shift get_ws_content($ws); + ok($con->{focused}, 'con is focused'); + done_testing; }; @@ -72,7 +75,7 @@ subtest 'Window without WM_TAKE_FOCUS', sub { # list), the window cannot accept input focus, so we should not try to focus # the window at all. subtest 'Window with WM_TAKE_FOCUS and without InputHint', sub { - fresh_workspace; + my $ws = fresh_workspace; my $take_focus = $x->atom(name => 'WM_TAKE_FOCUS'); @@ -88,6 +91,9 @@ subtest 'Window with WM_TAKE_FOCUS and without InputHint', sub { ok(!recv_take_focus($window), 'did not receive ClientMessage'); + my $con = shift get_ws_content($ws); + ok($con->{focused}, 'con is focused'); + done_testing; }; @@ -97,7 +103,7 @@ subtest 'Window with WM_TAKE_FOCUS and without InputHint', sub { # nearly identical presently, so this is currently used also as a proxy test # for the latter case. subtest 'Window with WM_TAKE_FOCUS and unspecified InputHint', sub { - fresh_workspace; + my $ws = fresh_workspace; my $take_focus = $x->atom(name => 'WM_TAKE_FOCUS'); @@ -105,6 +111,9 @@ subtest 'Window with WM_TAKE_FOCUS and unspecified InputHint', sub { ok(!recv_take_focus($window), 'did not receive ClientMessage'); + my $con = shift get_ws_content($ws); + ok($con->{focused}, 'con is focused'); + done_testing; };