diff options
author | okan <okan> | 2016-10-18 17:03:30 +0000 |
---|---|---|
committer | okan <okan> | 2016-10-18 17:03:30 +0000 |
commit | 0bb1be86c69ea95103e1a6b38c093406a47cdb07 (patch) | |
tree | b7aa2c4a5a2c09bb20637f0c50dd4c01377abda0 /search.c | |
parent | 38eac7d7e9d36243271eb7f968a3152c9eb0cfbc (diff) | |
download | cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.gz cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.xz cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.zip |
Refactor callbacks to take a void * so as to not try and generalize into
client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's based on context. While here, limit some globals, replace defines with appropriate variables and fix some naming.
Diffstat (limited to 'search.c')
-rw-r--r-- | search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/search.c b/search.c index f52d87d..efc2e73 100644 --- a/search.c +++ b/search.c @@ -72,7 +72,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) /* Then, on window names. */ if (tier < 0) { - TAILQ_FOREACH_REVERSE(wn, &cc->nameq, winname_q, entry) + TAILQ_FOREACH_REVERSE(wn, &cc->nameq, name_q, entry) if (strsubmatch(search, wn->name, 0)) { cc->matchname = wn->name; tier = 2; @@ -126,7 +126,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) void search_print_cmd(struct menu *mi, int i) { - struct cmd *cmd = (struct cmd *)mi->ctx; + struct cmd_ctx *cmd = (struct cmd_ctx *)mi->ctx; (void)snprintf(mi->print, sizeof(mi->print), "%s", cmd->name); } |