summaryrefslogtreecommitdiffstats
path: root/core/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-30 19:32:47 +0200
committerwm4 <wm4@nowhere>2013-06-30 19:32:47 +0200
commit2396e62c0be8be2bb39cd2a85021a5f391a0fe54 (patch)
treeea7c826a4e65fe544c9fc9051f0549cbf09c6037 /core/input
parentf3045eff1edb1fb949cb8b8be858733140041087 (diff)
downloadmpv-2396e62c0be8be2bb39cd2a85021a5f391a0fe54.tar.bz2
mpv-2396e62c0be8be2bb39cd2a85021a5f391a0fe54.tar.xz
input: don't ignore press-only mouse button events
Before this commit, only mouse events with both down and up events were processed. This caused a regression with ignoring mouse wheel events in cocoa, because these don't distinguish between up and down. Regression caused by 5b38a52.
Diffstat (limited to 'core/input')
-rw-r--r--core/input/input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/input/input.c b/core/input/input.c
index 9771dd0420..e843a88380 100644
--- a/core/input/input.c
+++ b/core/input/input.c
@@ -1346,7 +1346,8 @@ static mp_cmd_t *interpret_key(struct input_ctx *ictx, int code)
}
// This is a key up event, but the key up command is added by
// release_down_cmd(), not by this code.
- emit_key &= !(code & MP_KEY_EMIT_ON_UP);
+ if ((code & MP_KEY_EMIT_ON_UP) && ictx->current_down_cmd)
+ emit_key = false;
// Interpret only maximal point of multibutton event
ret = NULL;
if (emit_key)