summaryrefslogtreecommitdiffstats
path: root/fifo.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-21 11:05:21 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-21 11:05:21 +0000
commitff32ae1051778bb8a1904ab4f93d304208c666eb (patch)
tree8af216c68b6af6fc48cedecf4037dc993017f99a /fifo.c
parent63b14952d2f616a75cadf2ee7b3b0f3d578218a1 (diff)
downloadmpv-ff32ae1051778bb8a1904ab4f93d304208c666eb.tar.bz2
mpv-ff32ae1051778bb8a1904ab4f93d304208c666eb.tar.xz
Move code to ignore mouse wheel "down" events to fifo.c (needed because
they too easily cause those "buttons" to get stuck), reducing code duplication. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21982 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'fifo.c')
-rw-r--r--fifo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fifo.c b/fifo.c
index 35b8777697..bd9afc54b7 100644
--- a/fifo.c
+++ b/fifo.c
@@ -79,6 +79,8 @@ void mplayer_put_key(int code) {
(code & ~MP_KEY_DOWN) >= MOUSE_BTN0_DBL &&
(code & ~MP_KEY_DOWN) <= MOUSE_BTN9_DBL)
return;
+ // ignore mouse wheel down events since they can easily get stuck
+ if (code < (MOUSE_BTN3 | MP_KEY_DOWN) || code > (MOUSE_BTN4 | MP_KEY_DOWN))
mplayer_put_key_internal(code);
if (code & MP_KEY_DOWN) {
code &= ~MP_KEY_DOWN;