Mercurial > mplayer.hg
changeset 21964:d8ffeda84296
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.
author | reimar |
---|---|
date | Sun, 21 Jan 2007 11:05:21 +0000 |
parents | b031f5863b41 |
children | 5a2311125dc4 |
files | fifo.c libvo/vo_sdl.c libvo/x11_common.c |
diffstat | 3 files changed, 2 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/fifo.c Sun Jan 21 10:49:08 2007 +0000 +++ b/fifo.c Sun Jan 21 11:05:21 2007 +0000 @@ -79,6 +79,8 @@ (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;
--- a/libvo/vo_sdl.c Sun Jan 21 10:49:08 2007 +0000 +++ b/libvo/vo_sdl.c Sun Jan 21 11:05:21 2007 +0000 @@ -1190,9 +1190,6 @@ case SDL_MOUSEBUTTONDOWN: if(vo_nomouse_input) break; - if(event.button.button == 4 || event.button.button == 5) - mplayer_put_key(MOUSE_BTN0+event.button.button-1); - else mplayer_put_key((MOUSE_BTN0+event.button.button-1) | MP_KEY_DOWN); break;
--- a/libvo/x11_common.c Sun Jan 21 10:49:08 2007 +0000 +++ b/libvo/x11_common.c Sun Jan 21 11:05:21 2007 +0000 @@ -1106,12 +1106,6 @@ mouse_waiting_hide = 1; mouse_timer = GetTimerMS(); } - // Ignore mouse wheel press event. - if (Event.xbutton.button > 3) - { - mplayer_put_key(MOUSE_BTN0 + Event.xbutton.button - 1); - break; - } #ifdef HAVE_NEW_GUI // Ignore mouse button 1-3 under GUI. if (use_gui && (Event.xbutton.button >= 1)