xcb_translate_coordinates_reply_t has unsigned dst_{x,y}, so explicitly
cast them to int16_t to get the right values.
Reported on irc by frostwork.

Signed-off-by: Julien Cristau <[email protected]>
---
 xwininfo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xwininfo.c b/xwininfo.c
index dfe090d..42a38a0 100644
--- a/xwininfo.c
+++ b/xwininfo.c
@@ -940,8 +940,8 @@ Display_Stats_Info (struct wininfo *w)
     if (!trans_coords)
        Fatal_Error ("Can't get translated coordinates.");
 
-    rx = trans_coords->dst_x;
-    ry = trans_coords->dst_y;
+    rx = (int16_t)trans_coords->dst_x;
+    ry = (int16_t)trans_coords->dst_y;
     free (trans_coords);
 
     xright = (dw - rx - w->geometry->border_width * 2 -
-- 
1.7.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to