1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-20 18:28:01 +00:00

small changes in event handling

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5062 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-03-13 10:59:20 +00:00
parent 9b68d1309b
commit d06ef6e4ec
2 changed files with 19 additions and 7 deletions

View File

@ -140,6 +140,12 @@ static mp_key_name_t key_names[] = {
// 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" },

View File

@ -459,9 +459,12 @@ int vo_x11_check_events(Display *mydisplay){
{
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 @@ int vo_x11_check_events(Display *mydisplay){
#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 @@ void vo_x11_fullscreen( void )
{
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 );
}