aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kbfunc.c10
-rw-r--r--mousefunc.c8
-rw-r--r--search.c10
3 files changed, 15 insertions, 13 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 046c898..a259d00 100644
--- a/kbfunc.c
+++ b/kbfunc.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: kbfunc.c,v 1.113 2015/07/12 14:31:47 okan Exp $
+ * $OpenBSD: kbfunc.c,v 1.114 2015/08/21 16:05:55 okan Exp $
*/
#include <sys/types.h>
@@ -177,8 +177,12 @@ kbfunc_menu_cmd(struct client_ctx *cc, union arg *arg)
struct menu_q menuq;
TAILQ_INIT(&menuq);
- TAILQ_FOREACH(cmd, &Conf.cmdq, entry)
- menuq_add(&menuq, cmd, "%s", cmd->name);
+ 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, "application", NULL, 0,
search_match_text, search_print_cmd)) != NULL)
diff --git a/mousefunc.c b/mousefunc.c
index b27ef5b..2a23985 100644
--- a/mousefunc.c
+++ b/mousefunc.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: mousefunc.c,v 1.96 2015/07/12 14:31:47 okan Exp $
+ * $OpenBSD: mousefunc.c,v 1.97 2015/08/21 16:05:55 okan Exp $
*/
#include <sys/types.h>
@@ -233,8 +233,12 @@ mousefunc_menu_cmd(struct client_ctx *cc, union arg *arg)
struct menu_q menuq;
TAILQ_INIT(&menuq);
- TAILQ_FOREACH(cmd, &Conf.cmdq, entry)
+ 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)
diff --git a/search.c b/search.c
index 7f64460..8d5382a 100644
--- a/search.c
+++ b/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.49 2015/07/12 14:31:47 okan Exp $
+ * $OpenBSD: search.c,v 1.50 2015/08/21 16:05:55 okan Exp $
*/
#include <sys/types.h>
@@ -127,14 +127,8 @@ void
search_print_cmd(struct menu *mi, int i)
{
struct cmd *cmd = (struct cmd *)mi->ctx;
- int special = 0;
- if ((strcmp(cmd->name, "lock") == 0) ||
- (strcmp(cmd->name, "term") == 0))
- special = 1;
-
- (void)snprintf(mi->print, sizeof(mi->print),
- (special) ? "[%s]" : "%s", cmd->name);
+ (void)snprintf(mi->print, sizeof(mi->print), "%s", cmd->name);
}
void