about summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2013-04-14 16:13:17 +0000
committerokan <okan>2013-04-14 16:13:17 +0000
commit6f185bb03c3ba0928ba6254485c710103379bd1a (patch)
treea1ad2c61058ca193942a4a00757ff25bd7c9a784 /mousefunc.c
parenta957ed7c7dcc287afcf33547326717701a0445de (diff)
parent16ed8bf8e4f561049b732b326f3d0ee475fe13f6 (diff)
downloadcwm-6f185bb03c3ba0928ba6254485c710103379bd1a.tar.gz
cwm-6f185bb03c3ba0928ba6254485c710103379bd1a.tar.xz
cwm-6f185bb03c3ba0928ba6254485c710103379bd1a.zip
cvsimport
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mousefunc.c b/mousefunc.c
index d604a34..dcf1073 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -227,6 +227,7 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
 	old_cc = client_current();
 
 	TAILQ_INIT(&menuq);
+
 	TAILQ_FOREACH(cc, &Clientq, entry)
 		if (cc->flags & CLIENT_HIDDEN) {
 			wname = (cc->label) ? cc->label : cc->name;
@@ -250,8 +251,9 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
 		if (old_cc != NULL)
 			client_ptrsave(old_cc);
 		client_ptrwarp(cc);
-	} else
-		menuq_clear(&menuq);
+	}
+
+	menuq_clear(&menuq);
 }
 
 void
@@ -263,6 +265,7 @@ mousefunc_menu_cmd(struct client_ctx *cc, void *arg)
 	struct cmd		*cmd;
 
 	TAILQ_INIT(&menuq);
+
 	TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
 		mi = xcalloc(1, sizeof(*mi));
 		(void)strlcpy(mi->text, cmd->label, sizeof(mi->text));
@@ -275,6 +278,6 @@ mousefunc_menu_cmd(struct client_ctx *cc, void *arg)
 	mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL);
 	if (mi != NULL)
 		u_spawn(((struct cmd *)mi->ctx)->image);
-	else
-		menuq_clear(&menuq);
+
+	menuq_clear(&menuq);
 }