diff -ubr ../MPlayer-20020824/libvo/vo_gl.c ./libvo/vo_gl.c --- ../MPlayer-20020824/libvo/vo_gl.c Fri Aug 9 13:43:49 2002 +++ ./libvo/vo_gl.c Tue Aug 27 00:21:42 2002 @@ -35,7 +35,6 @@ #include "x11_common.h" #include "aspect.h" - static vo_info_t vo_info = { "X11 (OpenGL)", @@ -79,6 +78,8 @@ static uint32_t texture_width; static uint32_t texture_height; +extern int slave_mode; + static void resize(int x,int y){ printf("[gl] Resize: %dx%d\n",x,y); glViewport( 0, 0, x, y ); @@ -204,6 +205,9 @@ // bpp = myximage->bits_per_pixel; //XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!! + if( slave_mode ) + vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | PointerMotionMask ); + else vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask #ifdef HAVE_NEW_INPUT | ButtonPressMask | ButtonReleaseMask diff -ubr ../MPlayer-20020824/libvo/vo_gl2.c ./libvo/vo_gl2.c --- ../MPlayer-20020824/libvo/vo_gl2.c Fri Aug 9 13:43:49 2002 +++ ./libvo/vo_gl2.c Tue Aug 27 00:21:26 2002 @@ -33,6 +33,8 @@ #define NDEBUG //#undef NDEBUG +extern int slave_mode; + static vo_info_t vo_info = { "X11 (OpenGL) - multiple textures version", @@ -708,6 +710,9 @@ XSync(mDisplay, False); //XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!! + if( slave_mode ) + vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | PointerMotionMask); + else vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask #ifdef HAVE_NEW_INPUT | ButtonPressMask | ButtonReleaseMask diff -ubr ../MPlayer-20020824/libvo/vo_x11.c ./libvo/vo_x11.c --- ../MPlayer-20020824/libvo/vo_x11.c Fri Aug 9 13:43:49 2002 +++ ./libvo/vo_x11.c Tue Aug 27 00:21:12 2002 @@ -49,6 +49,8 @@ #include "../mplayer.h" #endif +extern int slave_mode; + static vo_info_t vo_info = { "X11 ( XImage/Shm )", @@ -332,6 +334,10 @@ { XUnmapWindow( mDisplay,vo_window ); XChangeWindowAttributes( mDisplay,vo_window,xswamask,&xswa ); + + if( slave_mode ) + vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask PropertyChangeMask | ExposureMask | PointerMotionMask); + else vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | PropertyChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask ); XMapWindow( mDisplay,vo_window ); } else XSelectInput( mDisplay,vo_window,ExposureMask ); @@ -362,6 +368,9 @@ XSync( mDisplay,False ); // we cannot grab mouse events on root window :( + if( slave_mode ) + vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | PropertyChangeMask | ExposureMask ); + else vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | PropertyChangeMask | ExposureMask | ((WinID==0)?0:(ButtonPressMask | ButtonReleaseMask | PointerMotionMask)) ); diff -ubr ../MPlayer-20020824/libvo/vo_xmga.c ./libvo/vo_xmga.c --- ../MPlayer-20020824/libvo/vo_xmga.c Fri Aug 9 13:43:49 2002 +++ ./libvo/vo_xmga.c Tue Aug 27 00:20:48 2002 @@ -96,6 +96,8 @@ #include "mga_common.c" #undef VO_XMGA +exterm int slave_mode; + static void mDrawColorKey( void ) { XSetBackground( mDisplay,vo_gc,0 ); @@ -282,6 +284,9 @@ xWAttribs.colormap=XCreateColormap( mDisplay,mRootWin,vinfo.visual,AllocNone ); xWAttribs.background_pixel=0; xWAttribs.border_pixel=0; + if( slave_mode ) + xWAttribs.event_mask=StructureNotifyMask | ExposureMask | ((WinID==0)?0:(PropertyChangeMask | PointerMotionMask)); + else xWAttribs.event_mask=StructureNotifyMask | ExposureMask | KeyPressMask | ((WinID==0)?0:(ButtonPressMask | ButtonReleaseMask | PointerMotionMask | PropertyChangeMask)); xswamask=CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; @@ -293,6 +298,9 @@ { XUnmapWindow( mDisplay,vo_window ); XChangeWindowAttributes( mDisplay,vo_window,xswamask,&xWAttribs); + if( slave_mode ) + vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | PropertyChangeMask | ExposureMask | PointerMotionMask); + else vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | PropertyChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask ); } else XSelectInput( mDisplay,vo_window,ExposureMask ); diff -ubr ../MPlayer-20020824/libvo/vo_xv.c ./libvo/vo_xv.c --- ../MPlayer-20020824/libvo/vo_xv.c Wed Aug 21 17:23:26 2002 +++ ./libvo/vo_xv.c Tue Aug 27 00:20:11 2002 @@ -57,6 +57,8 @@ #include "../Gui/interface.h" #endif +extern int slave_mode; + static vo_info_t vo_info = { "X11/Xv", @@ -383,6 +385,9 @@ { XUnmapWindow( mDisplay,vo_window ); XChangeWindowAttributes( mDisplay,vo_window,xswamask,&xswa ); + if( slave_mode ) + vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | PropertyChangeMask | ExposureMask | PointerMotionMask); + else vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | PropertyChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask ); XMapWindow( mDisplay,vo_window ); } else { drwX=vo_dx; drwY=vo_dy; } @@ -395,6 +400,10 @@ vo_x11_classhint( mDisplay,vo_window,"xv" ); vo_hidecursor(mDisplay,vo_window); + if( slave_mode ) + vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | PropertyChangeMask | ((WinID==0) ? 0 : (PointerMotionMask) ) ); + + else vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PropertyChangeMask | ((WinID==0) ? 0 : (PointerMotionMask #ifdef HAVE_NEW_INPUT diff -ubr ../MPlayer-20020824/libvo/vo_xvidix.c ./libvo/vo_xvidix.c --- ../MPlayer-20020824/libvo/vo_xvidix.c Fri Aug 9 13:43:49 2002 +++ ./libvo/vo_xvidix.c Tue Aug 27 00:19:12 2002 @@ -49,6 +49,8 @@ #define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */ +extern int slave_mode; + /* X11 related variables */ /* Colorkey handling */ static XGCValues mGCV; @@ -281,6 +283,9 @@ xswa.border_pixel = 0; xswa.colormap = XCreateColormap(mDisplay, RootWindow(mDisplay, mScreen), vinfo.visual, AllocNone); + if( slave_mode ) + xswa.event_mask = StructureNotifyMask | ExposureMask | PropertyChangeMask | PointerMotionMask; + else xswa.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask | PropertyChangeMask | ((WinID==0)?0:(ButtonPressMask | ButtonReleaseMask | PointerMotionMask)); xswamask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; @@ -292,6 +297,9 @@ { XUnmapWindow(mDisplay, vo_window); XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa); + if( slave_mode ) + vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | PropertyChangeMask | ExposureMask | PointerMotionMask ); + else vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | PropertyChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask ); } else XSelectInput( mDisplay,vo_window,ExposureMask ); } diff -ubr ../MPlayer-20020824/mplayer.c ./mplayer.c --- ../MPlayer-20020824/mplayer.c Thu Aug 22 17:30:31 2002 +++ ./mplayer.c Mon Aug 26 23:52:47 2002 @@ -752,7 +752,7 @@ #ifdef HAVE_NEW_INPUT current_module = "init_input"; mp_input_init(); -if(keyb_fifo_get > 0) +if(( keyb_fifo_get > 0) && !slave_mode ) mp_input_add_key_fd(keyb_fifo_get,1,NULL,NULL); if(slave_mode) mp_input_add_cmd_fd(0,1,NULL,NULL);