# HG changeset patch # User pontscho # Date 999093128 0 # Node ID 0880718750d519a35b97f1a8fd27278aaceb485a # Parent b603192051527138cea37222cdb4aba40d6ca8b6 fix signalhandling diff -r b60319205152 -r 0880718750d5 Gui/mplayer/mplayer.c --- a/Gui/mplayer/mplayer.c Wed Aug 29 13:44:12 2001 +0000 +++ b/Gui/mplayer/mplayer.c Wed Aug 29 13:52:08 2001 +0000 @@ -53,7 +53,7 @@ // parse_cfgfiles( argc,argv,envp ); // allocates shmem to gtkShMem - // fork() a process which runs gtkThreadProc() [gtkChildPID] + // fork() a process which runs gtkThreadProc() [gtkPID] gtkInit( argc,argv,envp ); // allocates shmem to mplShMem @@ -76,6 +76,7 @@ wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsShowWindow,"ViDEO" ); vo_setwindow(appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC); + vo_setwindowsize( appMPlayer.sub.width,appMPlayer.sub.height ); mplSubRender=0; wsCreateWindow( &appMPlayer.mainWindow, diff -r b60319205152 -r 0880718750d5 Gui/mplayer/widgets.c --- a/Gui/mplayer/widgets.c Wed Aug 29 13:44:12 2001 +0000 +++ b/Gui/mplayer/widgets.c Wed Aug 29 13:52:08 2001 +0000 @@ -59,8 +59,6 @@ Options=create_Options(); } -int gtkParent = 1; - // --- forked function static void gtkThreadProc( int argc,char * argv[] ) @@ -71,9 +69,7 @@ widgetsCreate(); -// gtkParentPID=getppid(); -// gtkChildPID=getpid(); - gtkParent=0; + gtkPID=getppid(); signal( SIGTYPE,gtkSigHandler ); @@ -89,9 +85,8 @@ void gtkInit( int argc,char* argv[], char *envp[] ) { - gtkParentPID=getpid(); gtkShMem=shmem_alloc( ShMemSize ); - if ( ( gtkChildPID = fork() ) == 0 ) gtkThreadProc( argc,argv ); + if ( ( gtkPID = fork() ) == 0 ) gtkThreadProc( argc,argv ); } void gtkDone( void ){ @@ -99,7 +94,7 @@ gtkSendMessage(evExit); usleep(50000); // 50ms should be enough! printf("gtk killed...\n"); - kill( gtkChildPID,SIGKILL ); + kill( gtkPID,SIGKILL ); } void gtkMessageBox( gchar * str )