diff options
author | wm4 <wm4@nowhere> | 2014-07-27 22:00:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-27 22:00:55 +0200 |
commit | 58255e0e2b7a8d5fef45968d7b8dcb2916ba5d6d (patch) | |
tree | aaaeb40c6d15c4e37a34bf5277024dd3e7ae6839 /input/input.c | |
parent | 4c533fbb16b99c4b28fbd968d81bb0b44e3084b5 (diff) | |
download | mpv-58255e0e2b7a8d5fef45968d7b8dcb2916ba5d6d.tar.bz2 mpv-58255e0e2b7a8d5fef45968d7b8dcb2916ba5d6d.tar.xz |
input: be stricter about rejecting mouse input with --no-input-cursor
Apparently this switch means all mouse input should be strictly
rejected. Some VO backends (such as X11) explicitly disable all mouse
events if this option is set, but others don't. So check them in
input.c, which increases consistency.
Diffstat (limited to 'input/input.c')
-rw-r--r-- | input/input.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/input/input.c b/input/input.c index 324f9f250d..ca3f63784d 100644 --- a/input/input.c +++ b/input/input.c @@ -692,6 +692,8 @@ static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale) release_down_cmd(ictx, false); return; } + if (!ictx->opts->enable_mouse_movements && MP_KEY_IS_MOUSE(unmod)) + return; if (unmod == MP_KEY_MOUSE_LEAVE) { update_mouse_section(ictx); struct mp_cmd *cmd = get_cmd_from_keys(ictx, NULL, code); |