[MPlayer-cvslog] r21982 - in trunk: fifo.c libvo/vo_sdl.c libvo/x11_common.c
reimar
subversion at mplayerhq.hu
Sun Jan 21 12:05:21 CET 2007
Author: reimar
Date: Sun Jan 21 12:05:21 2007
New Revision: 21982
Modified:
trunk/fifo.c
trunk/libvo/vo_sdl.c
trunk/libvo/x11_common.c
Log:
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.
Modified: trunk/fifo.c
==============================================================================
--- trunk/fifo.c (original)
+++ trunk/fifo.c Sun Jan 21 12:05:21 2007
@@ -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;
Modified: trunk/libvo/vo_sdl.c
==============================================================================
--- trunk/libvo/vo_sdl.c (original)
+++ trunk/libvo/vo_sdl.c Sun Jan 21 12:05:21 2007
@@ -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;
Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c (original)
+++ trunk/libvo/x11_common.c Sun Jan 21 12:05:21 2007
@@ -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)
More information about the MPlayer-cvslog
mailing list