diff options
author | 2001-08-26 00:28:56 +0000 | |
---|---|---|
committer | 2001-08-26 00:28:56 +0000 | |
commit | 541720dbbf5a9380623003b1d6ae7a55649726f9 (patch) | |
tree | c6a63a2aea1eb8b9712ad916c348cecfda3f9a5f /Gui/mplayer/widgets.c | |
parent | ce8520a39b1a3a116c31e7fb74a1da319df9212d (diff) |
gtk exit cleanup
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1701 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer/widgets.c')
-rw-r--r-- | Gui/mplayer/widgets.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c index 2186e6a222..91089809ed 100644 --- a/Gui/mplayer/widgets.c +++ b/Gui/mplayer/widgets.c @@ -4,6 +4,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <sys/wait.h> #include <unistd.h> #include <string.h> #include <signal.h> @@ -80,7 +81,7 @@ static void gtkThreadProc( int argc,char * argv[] ) gtkSendMessage( evGtkIsOk ); gtk_main(); - dbprintf( 6,"[gtk] exit.\n" ); + printf( "[gtk] exit.\n" ); exit( 0 ); } @@ -93,10 +94,12 @@ void gtkInit( int argc,char* argv[], char *envp[] ) if ( ( gtkChildPID = fork() ) == 0 ) gtkThreadProc( argc,argv ); } -void gtkDone( void ) -{ +void gtkDone( void ){ + int status; + gtkSendMessage(evExit); + usleep(50000); // 50ms should be enough! + printf("gtk killed...\n"); kill( gtkChildPID,SIGKILL ); - usleep( 1000 ); } void gtkMessageBox( gchar * str ) @@ -135,5 +138,3 @@ void gtkSetDefaultToCList( GtkWidget * list,char * item ) if ( ( i=gtkFindCList( list,item ) ) > -1 ) gtk_clist_select_row( GTK_CLIST( list ),i,0 ); } -void gtkExit( void ) -{ gtk_main_quit(); } |