ipc: send 'percent': null when percent is not relevant for the container

next
Michael Stapelberg 2011-07-24 14:47:28 +02:00
parent f0aa52f674
commit 36fde6dbe1
2 changed files with 4 additions and 2 deletions

View File

@ -193,7 +193,9 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
}
ystr("percent");
y(double, con->percent);
if (con->percent == 0.0)
y(null);
else y(double, con->percent);
ystr("urgent");
y(integer, con->urgent);

View File

@ -25,7 +25,7 @@ my $expected = {
window_rect => ignore(),
geometry => ignore(),
swallows => ignore(),
percent => 0,
percent => undef,
layout => 'default',
focus => ignore(),
focused => 0,