diff options
-rw-r--r-- | app/cwm/conf.c | 8 | ||||
-rw-r--r-- | app/cwm/menu.c | 7 | ||||
-rw-r--r-- | app/cwm/search.c | 12 |
3 files changed, 11 insertions, 16 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c index 2241a2904..54e67912c 100644 --- a/app/cwm/conf.c +++ b/app/cwm/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.187 2015/05/21 00:37:04 okan Exp $ + * $OpenBSD: conf.c,v 1.188 2015/06/30 18:42:50 okan Exp $ */ #include <sys/types.h> @@ -33,9 +33,9 @@ #include "calmwm.h" static const char *conf_bind_getmask(const char *, unsigned int *); -static void conf_cmd_remove(struct conf *, const char *); -static void conf_unbind_kbd(struct conf *, struct binding *); -static void conf_unbind_mouse(struct conf *, struct binding *); +static void conf_cmd_remove(struct conf *, const char *); +static void conf_unbind_kbd(struct conf *, struct binding *); +static void conf_unbind_mouse(struct conf *, struct binding *); int conf_cmd_add(struct conf *c, const char *name, const char *path) diff --git a/app/cwm/menu.c b/app/cwm/menu.c index a21bb7d7a..c9106e84d 100644 --- a/app/cwm/menu.c +++ b/app/cwm/menu.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: menu.c,v 1.84 2015/06/26 17:17:46 okan Exp $ + * $OpenBSD: menu.c,v 1.85 2015/06/30 18:42:50 okan Exp $ */ #include <sys/types.h> @@ -72,7 +72,7 @@ static void menu_draw(struct menu_ctx *, struct menu_q *, static void menu_draw_entry(struct menu_ctx *, struct menu_q *, int, int); static int menu_calc_entry(struct menu_ctx *, int, int); -static struct menu *menu_complete_path(struct menu_ctx *); +static struct menu *menu_complete_path(struct menu_ctx *); static int menu_keycode(XKeyEvent *, enum ctltype *, char *); struct menu * @@ -184,6 +184,7 @@ out: static struct menu * menu_complete_path(struct menu_ctx *mc) { + struct screen_ctx *sc = mc->sc; struct menu *mi, *mr; struct menu_q menuq; @@ -191,7 +192,7 @@ menu_complete_path(struct menu_ctx *mc) TAILQ_INIT(&menuq); - if ((mi = menu_filter(mc->sc, &menuq, mc->searchstr, NULL, + if ((mi = menu_filter(sc, &menuq, mc->searchstr, NULL, CWM_MENU_DUMMY, search_match_path_any, NULL)) != NULL) { mr->abort = mi->abort; mr->dummy = mi->dummy; diff --git a/app/cwm/search.c b/app/cwm/search.c index deff8e38a..a4046cb32 100644 --- a/app/cwm/search.c +++ b/app/cwm/search.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: search.c,v 1.44 2015/06/28 19:50:46 okan Exp $ + * $OpenBSD: search.c,v 1.45 2015/06/30 18:42:50 okan Exp $ */ #include <sys/types.h> @@ -42,10 +42,6 @@ static void search_match_path_exec(struct menu_q *, struct menu_q *, char *); static int strsubmatch(char *, char *, int); -/* - * Match: label, title, class. - */ - void search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) { @@ -66,7 +62,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) TAILQ_FOREACH(mi, menuq, entry) { int tier = -1, t; - struct client_ctx *cc = mi->ctx; + struct client_ctx *cc = (struct client_ctx *)mi->ctx; /* First, try to match on labels. */ if (cc->label != NULL && strsubmatch(search, cc->label, 0)) { @@ -130,11 +126,9 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) void search_print_client(struct menu *mi, int list) { - struct client_ctx *cc; + struct client_ctx *cc = (struct client_ctx *)mi->ctx; char flag = ' '; - cc = mi->ctx; - if (cc == client_current()) flag = '!'; else if (cc->flags & CLIENT_HIDDEN) |