diff options
Diffstat (limited to 'testcases/t/283-net-wm-state-hidden.t')
-rw-r--r-- | testcases/t/283-net-wm-state-hidden.t | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/testcases/t/283-net-wm-state-hidden.t b/testcases/t/283-net-wm-state-hidden.t index d6c7b2f8..0738ee0b 100644 --- a/testcases/t/283-net-wm-state-hidden.t +++ b/testcases/t/283-net-wm-state-hidden.t @@ -20,29 +20,8 @@ use i3test; use X11::XCB qw(:all); sub is_hidden { - sync_with_i3; - my $atom = $x->atom(name => '_NET_WM_STATE_HIDDEN'); - my ($con) = @_; - my $cookie = $x->get_property( - 0, - $con->{id}, - $x->atom(name => '_NET_WM_STATE')->id, - GET_PROPERTY_TYPE_ANY, - 0, - 4096 - ); - - my $reply = $x->get_property_reply($cookie->{sequence}); - my $len = $reply->{length}; - return 0 if $len == 0; - - my @atoms = unpack("L$len", $reply->{value}); - for (my $i = 0; $i < $len; $i++) { - return 1 if $atoms[$i] == $atom->id; - } - - return 0; + return net_wm_state_contains($con, '_NET_WM_STATE_HIDDEN'); } my ($tabA, $tabB, $tabC, $subtabA, $subtabB, $windowA, $windowB); |