summaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authornicm <nicm>2019-09-16 13:27:14 +0000
committernicm <nicm>2019-09-16 13:27:14 +0000
commit83be3afc54b783fabb5e57d2588887b9c8c0decf (patch)
tree28e1a736433e86b170ed9c1c93bf9ff199d56b30 /menu.c
parent63e07b245f898af17657c4655f1251aa43e19d0c (diff)
Change menu key bindings to Up and Down and also close it on any mouse
press if opened by key.
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index da8d89c4..6024ba02 100644
--- a/menu.c
+++ b/menu.c
@@ -185,8 +185,11 @@ menu_key_cb(struct client *c, struct key_event *event)
const char *name;
if (KEYC_IS_MOUSE(event->key)) {
- if (md->flags & MENU_NOMOUSE)
+ if (md->flags & MENU_NOMOUSE) {
+ if (MOUSE_BUTTONS(m->b) != 0)
+ return (1);
return (0);
+ }
if (m->x < md->px ||
m->x > md->px + 4 + menu->width ||
m->y < md->py + 1 ||