# HG changeset patch # User reimar # Date 1169377521 0 # Node ID d8ffeda84296872159fab7a078c1476a77aad737 # Parent b031f5863b41c81bcc7773ef74685c89f32d44be 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. diff -r b031f5863b41 -r d8ffeda84296 fifo.c --- 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; diff -r b031f5863b41 -r d8ffeda84296 libvo/vo_sdl.c --- 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; diff -r b031f5863b41 -r d8ffeda84296 libvo/x11_common.c --- 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)