diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-13 10:59:20 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-13 10:59:20 +0000 |
commit | d06ef6e4ec5393995afb7e26e4e89e007792f2c3 (patch) | |
tree | 66ef83e28b97dab3c9d7e10c02a6af23e5b359ad /libvo/x11_common.c | |
parent | 9b68d1309bb9d2eff1ecbb42a4a434253667f573 (diff) | |
download | mpv-d06ef6e4ec5393995afb7e26e4e89e007792f2c3.tar.bz2 mpv-d06ef6e4ec5393995afb7e26e4e89e007792f2c3.tar.xz |
small changes in event handling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5062 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 654d4db54e..92da47d716 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -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 ); } |