Mercurial > mplayer.hg
changeset 5822:8e3251d0d9a6
-rootwin fixed, keys work, mouse doesn't
author | arpi |
---|---|
date | Wed, 24 Apr 2002 23:10:41 +0000 |
parents | 4ddef5a1038a |
children | daa705aff4f3 |
files | libvo/vo_x11.c libvo/vo_xv.c |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_x11.c Wed Apr 24 22:49:58 2002 +0000 +++ b/libvo/vo_x11.c Wed Apr 24 23:10:41 2002 +0000 @@ -353,6 +353,7 @@ #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay,vo_window); #endif + if(WinID!=0) do { XNextEvent( mDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != vo_window ); XSelectInput( mDisplay,vo_window,NoEventMask ); @@ -360,7 +361,9 @@ XSync( mDisplay,False ); vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv ); - XSelectInput( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask); + // we cannot grab mouse events on root window :( + XSelectInput( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | + ((WinID==0)?0:(ButtonPressMask | ButtonReleaseMask | PointerMotionMask)) ); #ifdef HAVE_XF86VM if ( vm )
--- a/libvo/vo_xv.c Wed Apr 24 22:49:58 2002 +0000 +++ b/libvo/vo_xv.c Wed Apr 24 23:10:41 2002 +0000 @@ -417,11 +417,12 @@ vo_x11_classhint( mDisplay,vo_window,"xv" ); vo_hidecursor(mDisplay,vo_window); - if(WinID!=0) - XSelectInput(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask + XSelectInput(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | + ((WinID==0) ? 0 : (PointerMotionMask #ifdef HAVE_NEW_INPUT | ButtonPressMask | ButtonReleaseMask #endif + )) ); XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); if ( vo_fs ) vo_x11_decoration( mDisplay,vo_window,0 );