summaryrefslogtreecommitdiffstats
path: root/talloc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-04 01:11:05 +0200
committerwm4 <wm4@nowhere>2013-04-24 17:46:40 +0200
commit274af126946e8d0bc2a96a16967d768d26683154 (patch)
treecd8b0899ce418677e698ddf20498c753a74ba12f /talloc.c
parent36c31f47b2a5e4010dd8ac7f0d47ba3ca86043ef (diff)
downloadmpv-274af126946e8d0bc2a96a16967d768d26683154.tar.bz2
mpv-274af126946e8d0bc2a96a16967d768d26683154.tar.xz
input: fix handling of MP_KEY_STATE_DOWN
VOs can use the MP_KEY_STATE_DOWN modifier to pass key up/down events to input.c, instead of just simple key presses. This allows doing key auto- repeat handling in input.c, if the VO doesn't want to do that. One issue is that so far, this code has been used only for mouse events, even though the code was originally written with keyboard keys in mind. One difference between mouse keys and keyboard keys is that the initial key down should not generate an input command with mouse buttons (input.c did that), while keyboard events should (input.c didn't do that). Likewise, releasing a key should generate input commands for mouse buttons releases, but not for the keyboard. Change the code so mouse buttons (recognized via the MP_NO_REPEAT_KEY flag) follow the old hehavior, while other keys generate input commands on key down, but not on key release. Note that a key release event is posted either using MP_INPUT_RELEASE_ALL, or a normal key press event after having sent a an event with MP_KEY_STATE_DOWN. This is probably a bit confusing, and a MP_KEY_STATE_RELEASE should be added. Fix shift-handling with MP_KEY_STATE_DOWN as well.
Diffstat (limited to 'talloc.c')
0 files changed, 0 insertions, 0 deletions