[Mplayer-cvslog] CVS: main/Gui/mplayer widgets.c,1.3,1.4 mplayer.c,1.4,1.5

Zoltan Ponekker pontscho at mplayer.dev.hu
Wed Aug 29 15:52:13 CEST 2001


Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mplayer:/var/tmp.root/cvs-serv21582/Gui/mplayer

Modified Files:
	widgets.c mplayer.c 
Log Message:
fix signalhandling

Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- widgets.c	26 Aug 2001 00:28:56 -0000	1.3
+++ widgets.c	29 Aug 2001 13:52:08 -0000	1.4
@@ -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 )

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mplayer.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mplayer.c	27 Aug 2001 23:56:43 -0000	1.4
+++ mplayer.c	29 Aug 2001 13:52:08 -0000	1.5
@@ -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,




More information about the MPlayer-cvslog mailing list