changeset 3281:51899d4db077

Fixed #318: Replaced XRectangle arguments of XGetGeometry
author unexist
date Fri, 09 Feb 2018 13:12:23 +0100
parents 11325608b718
children ef3a87ece392
files src/shared/shared.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/shared/shared.c	Fri Feb 09 13:07:48 2018 +0100
+++ b/src/shared/shared.c	Fri Feb 09 13:12:23 2018 +0100
@@ -337,15 +337,18 @@
   XRectangle *geometry)
 {
   Window root = None;
-  unsigned int bw = 0, depth = 0;
-  XRectangle r = { 0 };
+  int x = 0, y = 0;
+  unsigned int width = 0, height = 0, bw = 0, depth = 0;
 
   assert(win && geometry);
 
-  XGetGeometry(disp, win, &root, (int *)&r.x, (int *)&r.y,
-    (unsigned int *)&r.width, (unsigned int *)&r.height, &bw, &depth);
+  XGetGeometry(disp, win, &root, &x, &y,
+    &width, &height, &bw, &depth);
 
-  *geometry = r;
+  geometry->x      = x;
+  geometry->y      = y;
+  geometry->width  = width;
+  geometry->height = height;
 } /* }}} */
 
  /** subSharedPropertyDelete {{{