ipc: send 'percent': null when percent is not relevant for the container
This commit is contained in:
parent
f0aa52f674
commit
36fde6dbe1
|
@ -193,7 +193,9 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ystr("percent");
|
ystr("percent");
|
||||||
y(double, con->percent);
|
if (con->percent == 0.0)
|
||||||
|
y(null);
|
||||||
|
else y(double, con->percent);
|
||||||
|
|
||||||
ystr("urgent");
|
ystr("urgent");
|
||||||
y(integer, con->urgent);
|
y(integer, con->urgent);
|
||||||
|
|
|
@ -25,7 +25,7 @@ my $expected = {
|
||||||
window_rect => ignore(),
|
window_rect => ignore(),
|
||||||
geometry => ignore(),
|
geometry => ignore(),
|
||||||
swallows => ignore(),
|
swallows => ignore(),
|
||||||
percent => 0,
|
percent => undef,
|
||||||
layout => 'default',
|
layout => 'default',
|
||||||
focus => ignore(),
|
focus => ignore(),
|
||||||
focused => 0,
|
focused => 0,
|
||||||
|
|
Loading…
Reference in New Issue