diff options
author | okan | 2014-01-29 22:30:00 +0000 |
---|---|---|
committer | okan | 2014-01-29 22:30:00 +0000 |
commit | 8c125f543f9d7757a98d140d19249b88b52407ac (patch) | |
tree | 9a1b753121e534afed729b999ac53a28e6609ac9 /mousefunc.c | |
parent | ae75349e183445d763e761c30d7e39dc49ffeb59 (diff) | |
download | cwm-8c125f543f9d7757a98d140d19249b88b52407ac.tar.gz |
Minimize trivial differences between a few kb and mb functions.
Diffstat (limited to 'mousefunc.c')
-rw-r--r-- | mousefunc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/mousefunc.c b/mousefunc.c index 4a98295..28b8e16 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.68 2014/01/20 22:31:53 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.69 2014/01/29 22:30:00 okan Exp $ */ #include <sys/param.h> @@ -221,7 +221,6 @@ mousefunc_menu_unhide(struct client_ctx *cc, union arg *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; @@ -235,8 +234,8 @@ mousefunc_menu_unhide(struct client_ctx *cc, union arg *arg) if (TAILQ_EMPTY(&menuq)) return; - mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL); - if (mi != NULL) { + if ((mi = menu_filter(sc, &menuq, NULL, NULL, 0, + NULL, NULL)) != NULL) { cc = (struct client_ctx *)mi->ctx; client_unhide(cc); @@ -252,19 +251,19 @@ void mousefunc_menu_cmd(struct client_ctx *cc, union arg *arg) { struct screen_ctx *sc = cc->sc; + struct cmd *cmd; struct menu *mi; struct menu_q menuq; - struct cmd *cmd; TAILQ_INIT(&menuq); - TAILQ_FOREACH(cmd, &Conf.cmdq, entry) menuq_add(&menuq, cmd, "%s", cmd->name); + if (TAILQ_EMPTY(&menuq)) return; - mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL); - if (mi != NULL) + if ((mi = menu_filter(sc, &menuq, NULL, NULL, 0, + NULL, NULL)) != NULL) u_spawn(((struct cmd *)mi->ctx)->path); menuq_clear(&menuq); |