diff options
author | okan <okan> | 2016-09-22 14:36:03 +0000 |
---|---|---|
committer | okan <okan> | 2016-09-22 14:36:03 +0000 |
commit | 57b2a6cf796614df4723cc5ffff12101a21e7850 (patch) | |
tree | 7ffc6a2e6647a16fdb3e31c65c39858aee600947 /mousefunc.c | |
parent | 3947f1268ab4ba15af8f4eeea6224628188a7f5f (diff) | |
download | cwm-57b2a6cf796614df4723cc5ffff12101a21e7850.tar.gz cwm-57b2a6cf796614df4723cc5ffff12101a21e7850.tar.xz cwm-57b2a6cf796614df4723cc5ffff12101a21e7850.zip |
Continue merging kb and mouse functions: fold
mousefunc_menu_{client,cmd,group} into the respective kbfunc_menu_{client,cmd,group} functions; simply pass a flag down from config denoting mouse action behaviour.
Diffstat (limited to 'mousefunc.c')
-rw-r--r-- | mousefunc.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/mousefunc.c b/mousefunc.c index 36f9460..23f2490 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -155,80 +155,3 @@ mousefunc_client_move(struct client_ctx *cc, union arg *arg) } /* NOTREACHED */ } - -void -mousefunc_menu_group(struct client_ctx *cc, union arg *arg) -{ - struct screen_ctx *sc = cc->sc; - struct group_ctx *gc; - struct menu *mi; - struct menu_q menuq; - - TAILQ_INIT(&menuq); - TAILQ_FOREACH(gc, &sc->groupq, entry) { - if (group_holds_only_sticky(gc)) - continue; - menuq_add(&menuq, gc, "%d %s", gc->num, gc->name); - } - - if ((mi = menu_filter(sc, &menuq, NULL, NULL, CWM_MENU_LIST, - NULL, search_print_group)) != NULL) { - gc = (struct group_ctx *)mi->ctx; - (group_holds_only_hidden(gc)) ? - group_show(gc) : group_hide(gc); - } - - menuq_clear(&menuq); -} - -void -mousefunc_menu_client(struct client_ctx *cc, union arg *arg) -{ - struct screen_ctx *sc = cc->sc; - struct client_ctx *old_cc; - struct menu *mi; - struct menu_q menuq; - - old_cc = client_current(); - - TAILQ_INIT(&menuq); - TAILQ_FOREACH(cc, &sc->clientq, entry) { - if (cc->flags & CLIENT_HIDDEN) { - menuq_add(&menuq, cc, NULL); - } - } - - if ((mi = menu_filter(sc, &menuq, NULL, NULL, CWM_MENU_LIST, - NULL, search_print_client)) != NULL) { - cc = (struct client_ctx *)mi->ctx; - client_unhide(cc); - if (old_cc != NULL) - client_ptrsave(old_cc); - client_ptrwarp(cc); - } - - menuq_clear(&menuq); -} - -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; - - TAILQ_INIT(&menuq); - TAILQ_FOREACH(cmd, &Conf.cmdq, entry) { - if ((strcmp(cmd->name, "lock") == 0) || - (strcmp(cmd->name, "term") == 0)) - continue; - menuq_add(&menuq, cmd, NULL); - } - - if ((mi = menu_filter(sc, &menuq, NULL, NULL, CWM_MENU_LIST, - NULL, search_print_cmd)) != NULL) - u_spawn(((struct cmd *)mi->ctx)->path); - - menuq_clear(&menuq); -} |