summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorokan <okan>2014-01-03 14:23:50 +0000
committerokan <okan>2014-01-03 14:23:50 +0000
commitf4c289b9e63c3daec2b6523871e07328dc778bb6 (patch)
tree5f7a62e413a7e25a9662bf2e23c3b0bb151b3cbb /client.c
parentb387351df1593020665df5e5ee5d86d16ad8b7d6 (diff)
parent08342471c86ca88dbfe71fffa55697f92378ff76 (diff)
downloadcwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.tar.gz
cwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.tar.xz
cwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.zip
cvsimport
Diffstat (limited to 'client.c')
-rw-r--r--client.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/client.c b/client.c
index 4b8214d..270a289 100644
--- a/client.c
+++ b/client.c
@@ -40,7 +40,7 @@ static void			 client_wm_protocols(struct client_ctx *);
 static void			 client_mwm_hints(struct client_ctx *);
 static int			 client_inbound(struct client_ctx *, int, int);
 
-struct client_ctx	*_curcc = NULL;
+struct client_ctx	*curcc = NULL;
 
 struct client_ctx *
 client_find(Window win)
@@ -59,7 +59,7 @@ client_init(Window win, struct screen_ctx *sc, int mapped)
 {
 	struct client_ctx	*cc;
 	XWindowAttributes	 wattr;
-	int			 state;
+	long			 state;
 
 	if (win == None)
 		return (NULL);
@@ -192,7 +192,7 @@ client_setactive(struct client_ctx *cc)
 	if (!sc->cycling)
 		client_mtf(cc);
 
-	_curcc = cc;
+	curcc = cc;
 	cc->active = 1;
 	cc->flags &= ~CLIENT_URGENCY;
 	client_draw_border(cc);
@@ -210,13 +210,13 @@ client_none(struct screen_ctx *sc)
 
 	xu_ewmh_net_active_window(sc, none);
 
-	_curcc = NULL;
+	curcc = NULL;
 }
 
 struct client_ctx *
 client_current(void)
 {
-	return (_curcc);
+	return (curcc);
 }
 
 void
@@ -832,6 +832,9 @@ client_applysizehints(struct client_ctx *cc)
 		cc->geom.w = MIN(cc->geom.w, cc->hint.maxw);
 	if (cc->hint.maxh)
 		cc->geom.h = MIN(cc->geom.h, cc->hint.maxh);
+
+	cc->geom.w = MAX(cc->geom.w, 1);
+	cc->geom.h = MAX(cc->geom.h, 1);
 }
 
 static void