summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2013-11-01 21:54:20 +0000
committerokan <okan>2013-11-01 21:54:20 +0000
commitb8f53666bd3d84114c6beab636ad410c51e86c67 (patch)
tree13e292a40c2f1b9b3be51deab705aae5dd616f8d
parent06eb13dfd949199a730e9373529ef2a7e9f4b1e6 (diff)
downloadcwm-b8f53666bd3d84114c6beab636ad410c51e86c67.tar.gz
cwm-b8f53666bd3d84114c6beab636ad410c51e86c67.tar.xz
cwm-b8f53666bd3d84114c6beab636ad410c51e86c67.zip
x/y from XSizeHints are obsolete (and have been for a long time), so
instead use x/y from XWindowAttributes when USPosition|PPosition are
set.
-rw-r--r--client.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/client.c b/client.c
index 60d9b2c..6a75600 100644
--- a/client.c
+++ b/client.c
@@ -695,10 +695,8 @@ client_placecalc(struct client_ctx *cc)
 		 */
 		xslack = sc->view.w - cc->geom.w - cc->bwidth * 2;
 		yslack = sc->view.h - cc->geom.h - cc->bwidth * 2;
-		if (cc->size->x > 0)
-			cc->geom.x = MIN(cc->size->x, xslack);
-		if (cc->size->y > 0)
-			cc->geom.y = MIN(cc->size->y, yslack);
+		cc->geom.x = MIN(cc->geom.x, xslack);
+		cc->geom.y = MIN(cc->geom.y, yslack);
 	} else {
 		struct geom		 xine;
 		int			 xmouse, ymouse;