my $top = open_standard_window($x);
my $bottom = open_standard_window($x);
-my @urgent = grep { $_->{urgent} == 1 } @{get_ws_content($tmp)};
+my @urgent = grep { $_->{urgent} } @{get_ws_content($tmp)};
is(@urgent, 0, 'no window got the urgent flag');
# cmd 'layout stacking';
sleep 0.5;
@content = @{get_ws_content($tmp)};
-@urgent = grep { $_->{urgent} == 1 } @content;
+@urgent = grep { $_->{urgent} } @content;
$top_info = first { $_->{window} == $top->id } @content;
$bottom_info = first { $_->{window} == $bottom->id } @content;
-is($top_info->{urgent}, 1, 'top window is marked urgent');
-is($bottom_info->{urgent}, 0, 'bottom window is not marked urgent');
+ok($top_info->{urgent}, 'top window is marked urgent');
+ok(!$bottom_info->{urgent}, 'bottom window is not marked urgent');
is(@urgent, 1, 'exactly one window got the urgent flag');
cmd '[id="' . $top->id . '"] focus';
-@urgent = grep { $_->{urgent} == 1 } @{get_ws_content($tmp)};
+@urgent = grep { $_->{urgent} } @{get_ws_content($tmp)};
is(@urgent, 0, 'no window got the urgent flag after focusing');
$top->add_hint('urgency');
sleep 0.5;
-@urgent = grep { $_->{urgent} == 1 } @{get_ws_content($tmp)};
+@urgent = grep { $_->{urgent} } @{get_ws_content($tmp)};
is(@urgent, 0, 'no window got the urgent flag after re-setting urgency hint');
#####################################################################
# Check if the workspace urgency hint gets set/cleared correctly
#####################################################################
my $ws = get_ws($tmp);
-is($ws->{urgent}, 0, 'urgent flag not set on workspace');
+ok(!$ws->{urgent}, 'urgent flag not set on workspace');
my $otmp = fresh_workspace;
sleep 0.5;
$ws = get_ws($tmp);
-is($ws->{urgent}, 1, 'urgent flag set on workspace');
+ok($ws->{urgent}, 'urgent flag set on workspace');
cmd "workspace $tmp";
$ws = get_ws($tmp);
-is($ws->{urgent}, 0, 'urgent flag not set on workspace after switching');
+ok(!$ws->{urgent}, 'urgent flag not set on workspace after switching');
done_testing;