diff options
author | wm4 <wm4@nowhere> | 2014-04-19 14:11:25 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-19 14:11:25 +0200 |
commit | 8f3850e7ed24caa4928a2fae9372fd3d7f487fe4 (patch) | |
tree | 244a729b15f93d100d5d07b34bcb126b5dbbc37f /input | |
parent | ba4263e99268f3da7f03eba3e0815698cdbf5801 (diff) | |
download | mpv-8f3850e7ed24caa4928a2fae9372fd3d7f487fe4.tar.bz2 mpv-8f3850e7ed24caa4928a2fae9372fd3d7f487fe4.tar.xz |
input: ignore modifiers on MOUSE_LEAVE
Just in case something adds shift/alt/ctrl state to it.
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/input/input.c b/input/input.c index 01c97c4c8b..c316fe06f3 100644 --- a/input/input.c +++ b/input/input.c @@ -640,12 +640,13 @@ static void interpret_key(struct input_ctx *ictx, int code, double scale) static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale) { + int unmod = code & ~MP_KEY_MODIFIER_MASK; if (code == MP_INPUT_RELEASE_ALL) { MP_DBG(ictx, "release all\n"); release_down_cmd(ictx, false); return; } - if (code == MP_KEY_MOUSE_LEAVE) { + if (unmod == MP_KEY_MOUSE_LEAVE) { update_mouse_section(ictx); struct mp_cmd *cmd = get_cmd_from_keys(ictx, NULL, code); if (cmd) @@ -656,7 +657,6 @@ static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale) double now = mp_time_sec(); int doubleclick_time = ictx->doubleclick_time; // ignore system-doubleclick if we generate these events ourselves - int unmod = code & ~MP_KEY_MODIFIER_MASK; if (doubleclick_time && MP_KEY_IS_MOUSE_BTN_DBL(unmod)) return; interpret_key(ictx, code, scale); |