summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-01-24 17:03:58 +0000
committerChristian Neukirchen <chneukirchen@gmail.com>2015-01-24 17:03:58 +0000
commite4ccad30ce77bed173dd352380bd236b4a7670f4 (patch)
tree3843d8ce77d8ebd5d4fc7303defda17dabd3f030
parent742732a1c818e382bfd55e274b490e8b3cdf4dca (diff)
parentd8fa58bb6256d5a499d7cd957b95b5b052cf16a2 (diff)
downloadcwm-e4ccad30ce77bed173dd352380bd236b4a7670f4.tar.gz
cwm-e4ccad30ce77bed173dd352380bd236b4a7670f4.tar.xz
cwm-e4ccad30ce77bed173dd352380bd236b4a7670f4.zip
cvsimport
-rw-r--r--client.c11
-rw-r--r--conf.c2
2 files changed, 6 insertions, 7 deletions
diff --git a/client.c b/client.c
index d49dd34..d3da826 100644
--- a/client.c
+++ b/client.c
@@ -63,7 +63,6 @@ client_init(Window win, struct screen_ctx *sc)
 {
 	struct client_ctx	*cc;
 	XWindowAttributes	 wattr;
-	long			 state;
 	int			 mapped;
 
 	if (win == None)
@@ -125,16 +124,16 @@ client_init(Window win, struct screen_ctx *sc)
 	/* Notify client of its configuration. */
 	client_config(cc);
 
-	if ((state = client_get_wm_state(cc)) < 0)
-		state = NormalState;
-
-	(state == IconicState) ? client_hide(cc) : client_unhide(cc);
-
 	TAILQ_INSERT_TAIL(&sc->clientq, cc, entry);
 
 	xu_ewmh_net_client_list(sc);
 	xu_ewmh_restore_net_wm_state(cc);
 
+	if (client_get_wm_state(cc) == IconicState)
+		client_hide(cc);
+	else
+		client_unhide(cc);
+
 	if (mapped)
 		group_autogroup(cc);
 
diff --git a/conf.c b/conf.c
index ad9f24c..0823dfd 100644
--- a/conf.c
+++ b/conf.c
@@ -96,7 +96,7 @@ conf_ignore(struct conf *c, const char *name)
 {
 	struct winname	*wn;
 
-	wn = xcalloc(1, sizeof(*wn));
+	wn = xmalloc(sizeof(*wn));
 	wn->name = xstrdup(name);
 	TAILQ_INSERT_TAIL(&c->ignoreq, wn, entry);
 }