diff options
author | tim <tim> | 2020-03-20 18:50:08 +0000 |
---|---|---|
committer | tim <tim> | 2020-03-20 18:50:08 +0000 |
commit | 6c7b8261df821459a7e0e6e04f5b4751132e25e4 (patch) | |
tree | e1d4fb6e6d9f099cf04d63e67f2eef1070fd59cc | |
parent | 49f839e194b990dde123f35435c86cf5baa42c4d (diff) | |
download | cwm-6c7b8261df821459a7e0e6e04f5b4751132e25e4.tar.gz cwm-6c7b8261df821459a7e0e6e04f5b4751132e25e4.tar.xz cwm-6c7b8261df821459a7e0e6e04f5b4751132e25e4.zip |
Simplify conditional construct.
OK okan@
-rw-r--r-- | kbfunc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kbfunc.c b/kbfunc.c index b38610f..cbccc56 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -509,7 +509,6 @@ kbfunc_menu_client(void *ctx, struct cargs *cargs) struct client_ctx *cc, *old_cc; struct menu *mi; struct menu_q menuq; - int all = (cargs->flag & CWM_MENU_WINDOW_ALL); int mflags = 0; if (cargs->xev == CWM_XEV_BTN) @@ -517,10 +516,8 @@ kbfunc_menu_client(void *ctx, struct cargs *cargs) TAILQ_INIT(&menuq); TAILQ_FOREACH(cc, &sc->clientq, entry) { - if (!all) { - if (cc->flags & CLIENT_HIDDEN) - menuq_add(&menuq, cc, NULL); - } else + if ((cargs->flag & CWM_MENU_WINDOW_ALL) || + (cc->flags & CLIENT_HIDDEN)) menuq_add(&menuq, cc, NULL); } |