aboutsummaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authornicm <nicm>2019-09-16 13:27:14 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2019-09-25 15:56:30 +0100
commite6995196f22c24fc76ffe1d83d987ae5fd270619 (patch)
tree1e49eec3bf009e8827f40991be21d63151028571 /menu.c
parenta74e37d32d5cd6654444d6517add43e3a91f14f0 (diff)
downloadrtmux-e6995196f22c24fc76ffe1d83d987ae5fd270619.tar.gz
rtmux-e6995196f22c24fc76ffe1d83d987ae5fd270619.tar.bz2
rtmux-e6995196f22c24fc76ffe1d83d987ae5fd270619.zip
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 ||