[Mplayer-cvslog] CVS: main/Gui/mplayer widgets.c,1.15,1.16

Zoltan Ponekker pontscho at mplayer.dev.hu
Tue Jan 15 18:03:22 CET 2002


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

Modified Files:
	widgets.c 
Log Message:
small gtk bug fix (-display bug, baze gabu, miattad fogok elkarhozni:), and remove gui dependencie in mencoder

Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- widgets.c	18 Dec 2001 20:01:10 -0000	1.15
+++ widgets.c	15 Jan 2002 17:03:19 -0000	1.16
@@ -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 @@
 
 // --- forked function
 
+extern char *mDisplayName;
+
 static void gtkThreadProc( int argc,char * argv[] )
 {
  struct sigaction sa;
@@ -73,8 +77,14 @@
  #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 gtkDone( void ){
- int status;
  gtkSendMessage(evExit);
  usleep(50000); // 50ms should be enough!
  printf("gtk killed...\n");




More information about the MPlayer-cvslog mailing list