summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2014-02-07 21:59:56 +0000
committerokan <okan>2014-02-07 21:59:56 +0000
commit2a87320bbf34457b79c55ad95d92a5eda4465073 (patch)
tree367550a1fc655987c4e3a326fc25054445c941e0
parent3cb81ebeead55a21f679f54e1a4105dccb2a613c (diff)
downloadcwm-2a87320bbf34457b79c55ad95d92a5eda4465073.tar.gz
cwm-2a87320bbf34457b79c55ad95d92a5eda4465073.tar.xz
cwm-2a87320bbf34457b79c55ad95d92a5eda4465073.zip
all mapped clients now should have a group, so simplify some cases
-rw-r--r--mousefunc.c2
-rw-r--r--search.c2
-rw-r--r--xutil.c6
3 files changed, 3 insertions, 7 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 6fdf4f4..e2b5766 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -203,7 +203,7 @@ mousefunc_menu_unhide(struct client_ctx *cc, union arg *arg)
 				continue;
 
 			menuq_add(&menuq, cc, "(%d) %s",
-			    cc->group ? cc->group->shortcut : 0, wname);
+			    cc->group->shortcut, wname);
 		}
 
 	if (TAILQ_EMPTY(&menuq))
diff --git a/search.c b/search.c
index 1346199..1e43d20 100644
--- a/search.c
+++ b/search.c
@@ -143,7 +143,7 @@ search_print_client(struct menu *mi, int list)
 		cc->matchname = cc->name;
 
 	(void)snprintf(mi->print, sizeof(mi->print), "(%d) %c%s",
-	    cc->group ? cc->group->shortcut : 0, flag, cc->matchname);
+	    cc->group->shortcut, flag, cc->matchname);
 
 	if (!list && cc->matchname != cc->name &&
 	    strlen(mi->print) < sizeof(mi->print) - 1) {
diff --git a/xutil.c b/xutil.c
index 43c64fb..b7df70f 100644
--- a/xutil.c
+++ b/xutil.c
@@ -291,11 +291,7 @@ xu_ewmh_net_desktop_names(struct screen_ctx *sc, char *data, int n)
 void
 xu_ewmh_net_wm_desktop(struct client_ctx *cc)
 {
-	struct group_ctx	*gc = cc->group;
-	long			 no = 0xffffffff;
-
-	if (gc)
-		no = gc->shortcut;
+	int	 no = cc->group->shortcut;
 
 	XChangeProperty(X_Dpy, cc->win, ewmh[_NET_WM_DESKTOP],
 	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&no, 1);