ipc: return signed int for container positions

If we use json as a language-agnostic representation, it makes sense to
use proper signed integers here.
This commit is contained in:
lbonn
2021-04-10 14:17:00 +02:00
parent fcf4c235d2
commit 496364fdbf
2 changed files with 4 additions and 2 deletions

View File

@ -34,3 +34,5 @@ strongly encouraged to upgrade.
• i3bar: exit with 1 when a wrong command line argument is used • i3bar: exit with 1 when a wrong command line argument is used
• fix commented-out rofi call in default i3 config • fix commented-out rofi call in default i3 config
• clear pixmap before drawing to prevent visual garbage • clear pixmap before drawing to prevent visual garbage
• ipc: return proper signed int for container positions: negative values were
returned as large 32 bits integers

View File

@ -235,9 +235,9 @@ static void dump_rect(yajl_gen gen, const char *name, Rect r) {
ystr(name); ystr(name);
y(map_open); y(map_open);
ystr("x"); ystr("x");
y(integer, r.x); y(integer, (int32_t)r.x);
ystr("y"); ystr("y");
y(integer, r.y); y(integer, (int32_t)r.y);
ystr("width"); ystr("width");
y(integer, r.width); y(integer, r.width);
ystr("height"); ystr("height");