mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Make it clear these are flags.
This commit is contained in:
parent
972e28d58c
commit
db93599a0f
8
conf.c
8
conf.c
@ -362,9 +362,9 @@ static const struct {
|
|||||||
{ "groupsearch", kbfunc_menu_group, CWM_CONTEXT_SC, {0} },
|
{ "groupsearch", kbfunc_menu_group, CWM_CONTEXT_SC, {0} },
|
||||||
{ "hide", kbfunc_client_hide, CWM_CONTEXT_CC, {0} },
|
{ "hide", kbfunc_client_hide, CWM_CONTEXT_CC, {0} },
|
||||||
{ "cycle", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
{ "cycle", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
||||||
{.i = CWM_CYCLE_FORWARD} },
|
{.i = (CWM_CYCLE_FORWARD)} },
|
||||||
{ "rcycle", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
{ "rcycle", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
||||||
{.i = CWM_CYCLE_REVERSE} },
|
{.i = (CWM_CYCLE_REVERSE)} },
|
||||||
{ "label", kbfunc_menu_client_label, CWM_CONTEXT_CC, {0} },
|
{ "label", kbfunc_menu_client_label, CWM_CONTEXT_CC, {0} },
|
||||||
{ "delete", kbfunc_client_delete, CWM_CONTEXT_CC, {0} },
|
{ "delete", kbfunc_client_delete, CWM_CONTEXT_CC, {0} },
|
||||||
{ "group1", kbfunc_group_toggle, CWM_CONTEXT_SC, {.i = 1} },
|
{ "group1", kbfunc_group_toggle, CWM_CONTEXT_SC, {.i = 1} },
|
||||||
@ -396,9 +396,9 @@ static const struct {
|
|||||||
{ "movetogroup9", kbfunc_client_movetogroup, CWM_CONTEXT_CC, {.i = 9} },
|
{ "movetogroup9", kbfunc_client_movetogroup, CWM_CONTEXT_CC, {.i = 9} },
|
||||||
{ "nogroup", kbfunc_group_alltoggle, CWM_CONTEXT_SC, {0} },
|
{ "nogroup", kbfunc_group_alltoggle, CWM_CONTEXT_SC, {0} },
|
||||||
{ "cyclegroup", kbfunc_group_cycle, CWM_CONTEXT_SC,
|
{ "cyclegroup", kbfunc_group_cycle, CWM_CONTEXT_SC,
|
||||||
{.i = CWM_CYCLE_FORWARD} },
|
{.i = (CWM_CYCLE_FORWARD)} },
|
||||||
{ "rcyclegroup", kbfunc_group_cycle, CWM_CONTEXT_SC,
|
{ "rcyclegroup", kbfunc_group_cycle, CWM_CONTEXT_SC,
|
||||||
{.i = CWM_CYCLE_REVERSE} },
|
{.i = (CWM_CYCLE_REVERSE)} },
|
||||||
{ "cycleingroup", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
{ "cycleingroup", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
||||||
{.i = (CWM_CYCLE_FORWARD | CWM_CYCLE_INGROUP)} },
|
{.i = (CWM_CYCLE_FORWARD | CWM_CYCLE_INGROUP)} },
|
||||||
{ "rcycleingroup", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
{ "rcycleingroup", kbfunc_client_cycle, CWM_CONTEXT_SC,
|
||||||
|
12
kbfunc.c
12
kbfunc.c
@ -312,7 +312,7 @@ kbfunc_menu_client(void *ctx, union arg *arg, enum xev xev)
|
|||||||
|
|
||||||
if ((mi = menu_filter(sc, &menuq,
|
if ((mi = menu_filter(sc, &menuq,
|
||||||
(m) ? NULL : "window", NULL,
|
(m) ? NULL : "window", NULL,
|
||||||
(m) ? CWM_MENU_LIST : 0,
|
((m) ? CWM_MENU_LIST : 0),
|
||||||
search_match_client, search_print_client)) != NULL) {
|
search_match_client, search_print_client)) != NULL) {
|
||||||
cc = (struct client_ctx *)mi->ctx;
|
cc = (struct client_ctx *)mi->ctx;
|
||||||
if (cc->flags & CLIENT_HIDDEN)
|
if (cc->flags & CLIENT_HIDDEN)
|
||||||
@ -347,7 +347,7 @@ kbfunc_menu_cmd(void *ctx, union arg *arg, enum xev xev)
|
|||||||
|
|
||||||
if ((mi = menu_filter(sc, &menuq,
|
if ((mi = menu_filter(sc, &menuq,
|
||||||
(m) ? NULL : "application", NULL,
|
(m) ? NULL : "application", NULL,
|
||||||
(m) ? CWM_MENU_LIST : 0,
|
((m) ? CWM_MENU_LIST : 0),
|
||||||
search_match_text, search_print_cmd)) != NULL) {
|
search_match_text, search_print_cmd)) != NULL) {
|
||||||
cmd = (struct cmd_ctx *)mi->ctx;
|
cmd = (struct cmd_ctx *)mi->ctx;
|
||||||
u_spawn(cmd->path);
|
u_spawn(cmd->path);
|
||||||
@ -373,7 +373,7 @@ kbfunc_menu_group(void *ctx, union arg *arg, enum xev xev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((mi = menu_filter(sc, &menuq,
|
if ((mi = menu_filter(sc, &menuq,
|
||||||
(m) ? NULL : "group", NULL, CWM_MENU_LIST,
|
(m) ? NULL : "group", NULL, (CWM_MENU_LIST),
|
||||||
search_match_text, search_print_group)) != NULL) {
|
search_match_text, search_print_group)) != NULL) {
|
||||||
gc = (struct group_ctx *)mi->ctx;
|
gc = (struct group_ctx *)mi->ctx;
|
||||||
(group_holds_only_hidden(gc)) ?
|
(group_holds_only_hidden(gc)) ?
|
||||||
@ -442,7 +442,7 @@ kbfunc_menu_exec(void *ctx, union arg *arg, enum xev xev)
|
|||||||
free(path);
|
free(path);
|
||||||
|
|
||||||
if ((mi = menu_filter(sc, &menuq, label, NULL,
|
if ((mi = menu_filter(sc, &menuq, label, NULL,
|
||||||
CWM_MENU_DUMMY | CWM_MENU_FILE,
|
(CWM_MENU_DUMMY | CWM_MENU_FILE),
|
||||||
search_match_exec_path, NULL)) != NULL) {
|
search_match_exec_path, NULL)) != NULL) {
|
||||||
if (mi->text[0] == '\0')
|
if (mi->text[0] == '\0')
|
||||||
goto out;
|
goto out;
|
||||||
@ -517,7 +517,7 @@ kbfunc_menu_ssh(void *ctx, union arg *arg, enum xev xev)
|
|||||||
free(lbuf);
|
free(lbuf);
|
||||||
(void)fclose(fp);
|
(void)fclose(fp);
|
||||||
menu:
|
menu:
|
||||||
if ((mi = menu_filter(sc, &menuq, "ssh", NULL, CWM_MENU_DUMMY,
|
if ((mi = menu_filter(sc, &menuq, "ssh", NULL, (CWM_MENU_DUMMY),
|
||||||
search_match_exec, NULL)) != NULL) {
|
search_match_exec, NULL)) != NULL) {
|
||||||
if (mi->text[0] == '\0')
|
if (mi->text[0] == '\0')
|
||||||
goto out;
|
goto out;
|
||||||
@ -543,7 +543,7 @@ kbfunc_menu_client_label(void *ctx, union arg *arg, enum xev xev)
|
|||||||
TAILQ_INIT(&menuq);
|
TAILQ_INIT(&menuq);
|
||||||
|
|
||||||
/* dummy is set, so this will always return */
|
/* dummy is set, so this will always return */
|
||||||
mi = menu_filter(cc->sc, &menuq, "label", cc->label, CWM_MENU_DUMMY,
|
mi = menu_filter(cc->sc, &menuq, "label", cc->label, (CWM_MENU_DUMMY),
|
||||||
search_match_text, NULL);
|
search_match_text, NULL);
|
||||||
|
|
||||||
if (!mi->abort) {
|
if (!mi->abort) {
|
||||||
|
2
menu.c
2
menu.c
@ -196,7 +196,7 @@ menu_complete_path(struct menu_ctx *mc)
|
|||||||
TAILQ_INIT(&menuq);
|
TAILQ_INIT(&menuq);
|
||||||
|
|
||||||
if ((mi = menu_filter(sc, &menuq, mc->searchstr, NULL,
|
if ((mi = menu_filter(sc, &menuq, mc->searchstr, NULL,
|
||||||
CWM_MENU_DUMMY, search_match_path_any, NULL)) != NULL) {
|
(CWM_MENU_DUMMY), search_match_path_any, NULL)) != NULL) {
|
||||||
mr->abort = mi->abort;
|
mr->abort = mi->abort;
|
||||||
mr->dummy = mi->dummy;
|
mr->dummy = mi->dummy;
|
||||||
if (mi->text[0] != '\0')
|
if (mi->text[0] != '\0')
|
||||||
|
Loading…
Reference in New Issue
Block a user