diff options
author | 2020-04-07 13:38:30 +0000 | |
---|---|---|
committer | 2020-04-07 13:38:30 +0000 | |
commit | 57d747eef2b80ca9ffb95407c05cf5e668ba72d6 (patch) | |
tree | 6d10e125d60f644dab6907096be1323b5526c96d /usr.bin/tmux/input-keys.c | |
parent | Zap a stray Pp. (diff) | |
download | wireguard-openbsd-57d747eef2b80ca9ffb95407c05cf5e668ba72d6.tar.xz wireguard-openbsd-57d747eef2b80ca9ffb95407c05cf5e668ba72d6.zip |
Do not send mouse events if the program has not requested them.
Diffstat (limited to 'usr.bin/tmux/input-keys.c')
-rw-r--r-- | usr.bin/tmux/input-keys.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c index 2af56439a5f..be7905a127c 100644 --- a/usr.bin/tmux/input-keys.c +++ b/usr.bin/tmux/input-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input-keys.c,v 1.70 2020/04/01 09:05:27 nicm Exp $ */ +/* $OpenBSD: input-keys.c,v 1.71 2020/04/07 13:38:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -271,6 +271,8 @@ input_key_get_mouse(struct screen *s, struct mouse_event *m, u_int x, u_int y, /* If this pane is not in button or all mode, discard motion events. */ if (MOUSE_DRAG(m->b) && (s->mode & MOTION_MOUSE_MODES) == 0) return (0); + if ((s->mode & ALL_MOUSE_MODES) == 0) + return (0); /* * If this event is a release event and not in all mode, discard it. |