aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2014-02-07 21:59:56 +0000
committerokan2014-02-07 21:59:56 +0000
commitda2cf40144126f1d08c1d74326c3e1129946674b (patch)
treeb224171228cb5e2249ae3843ee499224905feb94
parent411961cc6c0b1f83e1733b9679f10e1f7dda8dde (diff)
downloadcwm-da2cf40144126f1d08c1d74326c3e1129946674b.tar.gz
all mapped clients now should have a group, so simplify some cases
Diffstat (limited to '')
-rw-r--r--mousefunc.c4
-rw-r--r--search.c4
-rw-r--r--xutil.c8
3 files changed, 6 insertions, 10 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 682fa51..5bf3468 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: mousefunc.c,v 1.70 2014/01/30 14:40:21 okan Exp $
+ * $OpenBSD: mousefunc.c,v 1.71 2014/02/07 21:59:56 okan Exp $
*/
#include <sys/param.h>
@@ -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 9a49b13..380f760 100644
--- a/search.c
+++ b/search.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: search.c,v 1.36 2014/01/20 18:58:03 okan Exp $
+ * $OpenBSD: search.c,v 1.37 2014/02/07 21:59:56 okan Exp $
*/
#include <sys/param.h>
@@ -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 19623fc..9884148 100644
--- a/xutil.c
+++ b/xutil.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xutil.c,v 1.83 2014/01/03 15:29:06 okan Exp $
+ * $OpenBSD: xutil.c,v 1.84 2014/02/07 21:59:56 okan Exp $
*/
#include <sys/param.h>
@@ -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);