From c0f391e648f52cd9b8fa6e534a2f97a8ba0f46a9 Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Wed, 18 Mar 2020 19:46:53 +0100 Subject: Remove wm menu Whilst arguably useful for certain people, or in rare cases, this functionality is not needed in the general case. This will also remove a memory leak where fallback was not properly freed. --- kbfunc.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index 8af8436..1ce473e 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -591,33 +591,6 @@ kbfunc_menu_group(void *ctx, struct cargs *cargs) menuq_clear(&menuq); } -void -kbfunc_menu_wm(void *ctx, struct cargs *cargs) -{ - struct screen_ctx *sc = ctx; - struct cmd_ctx *wm; - struct menu *mi; - struct menu_q menuq; - int mflags = 0; - - if (cargs->xev == CWM_XEV_BTN) - mflags |= CWM_MENU_LIST; - - TAILQ_INIT(&menuq); - TAILQ_FOREACH(wm, &Conf.wmq, entry) - menuq_add(&menuq, wm, NULL); - - if ((mi = menu_filter(sc, &menuq, "wm", NULL, mflags, - search_match_wm, search_print_wm)) != NULL) { - wm = (struct cmd_ctx *)mi->ctx; - free(Conf.wm_argv); - Conf.wm_argv = xstrdup(wm->path); - cwm_status = CWM_EXEC_WM; - } - - menuq_clear(&menuq); -} - void kbfunc_menu_exec(void *ctx, struct cargs *cargs) { -- cgit v1.2.3-2-gb3c3