Mercurial > mplayer.hg
changeset 5061:40a97bdff44c
small changes in event handling
author | pontscho |
---|---|
date | Wed, 13 Mar 2002 10:59:20 +0000 |
parents | 485ef815e786 |
children | 90b692d38826 |
files | input/input.c libvo/x11_common.c |
diffstat | 2 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/input/input.c Wed Mar 13 01:45:42 2002 +0000 +++ b/input/input.c Wed Mar 13 10:59:20 2002 +0000 @@ -140,6 +140,12 @@ // This is the default binding we use when no config file is here static mp_cmd_bind_t def_cmd_binds[] = { + + { { MOUSE_BTN3, 0 }, "seek 10" }, + { { MOUSE_BTN4, 0 }, "seek -10" }, + { { MOUSE_BTN5, 0 }, "volume 1" }, + { { MOUSE_BTN6, 0 }, "volume -1" }, + { { KEY_RIGHT, 0 }, "seek 10" }, { { KEY_LEFT, 0 }, "seek -10" }, { { KEY_UP, 0 }, "seek 60" },
--- a/libvo/x11_common.c Wed Mar 13 01:45:42 2002 +0000 +++ b/libvo/x11_common.c Wed Mar 13 10:59:20 2002 +0000 @@ -459,9 +459,12 @@ { XNextEvent( mydisplay,&Event ); #ifdef HAVE_NEW_GUI - if ( use_gui ) guiGetEvent( 0,(char*)&Event ); + if ( use_gui ) + { + guiGetEvent( 0,(char*)&Event ); + if ( vo_window != Event.xany.window ) continue; + } #endif - //if ( vo_window == Event.xany.window ) // removed because it does not work with DGA ::atmos switch( Event.type ) { case Expose: @@ -503,11 +506,14 @@ #ifdef HAVE_NEW_INPUT case ButtonPress: // Ignore mouse whell press event - if(Event.xbutton.button == 4 || Event.xbutton.button == 5) - break; + if(Event.xbutton.button == 4 || Event.xbutton.button == 5) break; + // Ignor mouse button 1 - 3 under gui + if ( use_gui && ( Event.xbutton.button >= 1 )&&( Event.xbutton.button <= 3 ) ) break; mplayer_put_key((MOUSE_BTN0+Event.xbutton.button-1)|MP_KEY_DOWN); break; case ButtonRelease: + // Ignor mouse button 1 - 3 under gui + if ( use_gui && ( Event.xbutton.button >= 1 )&&( Event.xbutton.button <= 3 ) ) break; mplayer_put_key(MOUSE_BTN0+Event.xbutton.button-1); break; #endif @@ -532,11 +538,11 @@ { vo_fs=VO_TRUE; vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth; vo_old_height=vo_dheight; - { - Window root; int foo, foo2; +// { +// Window root; int foo, foo2; // XGetGeometry( mDisplay,vo_window,&root,&vo_old_x,&vo_old_y,&vo_old_width,vo_old_height,&foo,&foo2 ); // XTranslateCoordinates( mDisplay,vo_window,root,0,0,&vo_old_x,&vo_old_y,(Window *)&foo); - } +// } vo_dx=0; vo_dy=0; vo_dwidth=vo_screenwidth; vo_dheight=vo_screenheight; vo_x11_decoration( mDisplay,vo_window,0 ); }