y(bool, con->urgent);
ystr("focused");
- y(integer, (con == focused));
+ y(bool, (con == focused));
ystr("layout");
switch (con->layout) {
percent => undef,
layout => 'default',
focus => ignore(),
- focused => 0,
+ focused => JSON::XS::false,
urgent => JSON::XS::false,
border => 'normal',
'floating_nodes' => ignore(),
my ($nodes, $focus) = get_ws_content($tmp);
-is($nodes->[1]->{focused}, 0, 'split container not focused');
+ok(!$nodes->[1]->{focused}, 'split container not focused');
cmd 'focus parent';
($nodes, $focus) = get_ws_content($tmp);
-is($nodes->[1]->{focused}, 1, 'split container focused after focus parent');
+ok($nodes->[1]->{focused}, 'split container focused after focus parent');
my $third = open_empty_con($i3);
sleep 0.25;
($nodes, $focus) = get_ws_content($tmp);
is($nodes->[1]->{nodes}->[0]->{id}, $second, 'second container found');
-is($nodes->[1]->{nodes}->[0]->{focused}, 1, 'second container focused');
+ok($nodes->[1]->{nodes}->[0]->{focused}, 'second container focused');
##############################################################
# another case, using a slightly different layout (regression)
is($focus->[0], $second, 'same container on different ws');
($nodes, $focus) = get_ws_content($tmp);
-is($nodes->[0]->{focused}, 1, 'first container focused on first ws');
+ok($nodes->[0]->{focused}, 'first container focused on first ws');
###################################################################
# check if floating cons are moved to new workspaces properly