diff options
author | 2002-01-15 17:03:19 +0000 | |
---|---|---|
committer | 2002-01-15 17:03:19 +0000 | |
commit | 8d184312b08d57c659aef1fe8cee77303b940aa8 (patch) | |
tree | 035aa4f5e95a91e2a8271095bf20cb8d3f6b782a /Gui/mplayer/widgets.c | |
parent | eadeed12f4eb900c92f0e4f7a9dabd14fce47208 (diff) |
small gtk bug fix (-display bug, baze gabu, miattad fogok elkarhozni:), and remove gui dependencie in mencoder
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4177 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer/widgets.c')
-rw-r--r-- | Gui/mplayer/widgets.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c index 1629265a91..b056f5b4d2 100644 --- a/Gui/mplayer/widgets.c +++ b/Gui/mplayer/widgets.c @@ -9,7 +9,9 @@ #include <string.h> #include <signal.h> +#include <gdk/gdkprivate.h> #include <gdk/gdkkeysyms.h> +#include <gdk/gdk.h> #include <gtk/gtk.h> #include "widgets.h" @@ -64,6 +66,8 @@ void widgetsCreate( void ) // --- forked function +extern char *mDisplayName; + static void gtkThreadProc( int argc,char * argv[] ) { struct sigaction sa; @@ -73,8 +77,14 @@ static void gtkThreadProc( int argc,char * argv[] ) #endif gtk_set_locale(); - gtk_init( &argc,&argv ); + { + char tmp[128]; + sprintf( tmp,"--display=%s",mDisplayName ); + argv[argc++]=strdup( tmp ); + gtk_init( &argc,&argv ); + } gdk_set_use_xshm( TRUE ); + printf( "[gtk] display: %s\n",gdk_get_display() ); widgetsCreate(); @@ -101,7 +111,6 @@ void gtkInit( int argc,char* argv[], char *envp[] ) } void gtkDone( void ){ - int status; gtkSendMessage(evExit); usleep(50000); // 50ms should be enough! printf("gtk killed...\n"); |