changeset 6146:b9651eb9749e

fix some gtk bug...
author pontscho
date Mon, 20 May 2002 13:56:16 +0000
parents 26cb8736927b
children 4ec23f98516e
files Gui/mplayer/gtk/about.c Gui/mplayer/gtk/about.h Gui/mplayer/gtk/fs.c Gui/mplayer/gtk/fs.h Gui/mplayer/gtk/mb.c Gui/mplayer/gtk/mb.h Gui/mplayer/gtk/sb.c Gui/mplayer/gtk/sb.h Gui/mplayer/menu.h Gui/mplayer/play.c Gui/mplayer/sw.h Gui/mplayer/widgets.c Gui/mplayer/widgets.h Gui/wm/ws.c Gui/wm/ws.h
diffstat 15 files changed, 241 insertions(+), 167 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/gtk/about.c	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/about.c	Mon May 20 13:56:16 2002 +0000
@@ -7,8 +7,24 @@
 #include "../widgets.h"
 #include "about.h"
 
+int gtkVAboutBox = 0;
+GtkWidget * AboutBox;
+
+void ShowAboutBox( void )
+{
+ if ( gtkVAboutBox ) gtkActive( AboutBox );
+   else AboutBox=create_About();
+ gtk_widget_show( AboutBox );
+}
+
+void ab_AboutBox_show( GtkButton * button,gpointer user_data )
+{ gtkVAboutBox=(int)user_data; }
+
 void ab_Ok_released( GtkButton * button,gpointer user_data )
-{ gtk_widget_destroy( AboutBox ); }
+{
+ gtkVAboutBox=(int)user_data; 
+ gtk_widget_destroy( AboutBox );
+}
 
 GtkWidget * create_About( void )
 {
@@ -32,7 +48,7 @@
 
   GtkAccelGroup * accel_group;
 
-  accel_group=gtk_accel_group_new( );
+  accel_group=gtk_accel_group_new();
 
   About=gtk_window_new( GTK_WINDOW_TOPLEVEL );
   gtk_widget_set_name( About,MSGTR_About );
@@ -45,7 +61,7 @@
   frame1=gtk_frame_new( NULL );
   gtk_widget_set_name( frame1,"frame1" );
   gtk_widget_ref( frame1 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"frame1",frame1,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"frame1",frame1,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( frame1 );
   gtk_container_add( GTK_CONTAINER( About ),frame1 );
   gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN );
@@ -53,7 +69,7 @@
   frame2=gtk_frame_new( NULL );
   gtk_widget_set_name( frame2,"frame2" );
   gtk_widget_ref( frame2 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"frame2",frame2,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"frame2",frame2,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( frame2 );
   gtk_container_add( GTK_CONTAINER( frame1 ),frame2 );
   gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
@@ -61,7 +77,7 @@
   frame3=gtk_frame_new( NULL );
   gtk_widget_set_name( frame3,"frame3" );
   gtk_widget_ref( frame3 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"frame3",frame3,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"frame3",frame3,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( frame3 );
   gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
   gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT );
@@ -69,7 +85,7 @@
   frame4=gtk_frame_new( NULL );
   gtk_widget_set_name( frame4,"frame4" );
   gtk_widget_ref( frame4 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"frame4",frame4,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"frame4",frame4,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( frame4 );
   gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
   gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
@@ -77,7 +93,7 @@
   vbox1=gtk_vbox_new( FALSE,0 );
   gtk_widget_set_name( vbox1,"vbox1" );
   gtk_widget_ref( vbox1 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"vbox1",vbox1,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"vbox1",vbox1,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( vbox1 );
   gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
 
@@ -87,7 +103,7 @@
 
   gtk_widget_set_name( pixmap1,"pixmap1" );
   gtk_widget_ref( pixmap1 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( pixmap1 );
   gtk_box_pack_start( GTK_BOX( vbox1 ),pixmap1,FALSE,FALSE,0 );
   gtk_widget_set_usize( pixmap1,-2,174 );
@@ -95,7 +111,7 @@
   hseparator2=gtk_hseparator_new( );
   gtk_widget_set_name( hseparator2,"hseparator2" );
   gtk_widget_ref( hseparator2 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator2",hseparator2,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator2",hseparator2,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( hseparator2 );
   gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator2,FALSE,FALSE,0 );
   gtk_widget_set_usize( hseparator2,-2,7 );
@@ -103,7 +119,7 @@
   scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
   gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
   gtk_widget_ref( scrolledwindow1 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"scrolledwindow1",scrolledwindow1,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( scrolledwindow1 );
   gtk_box_pack_start( GTK_BOX( vbox1 ),scrolledwindow1,TRUE,TRUE,0 );
   gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
@@ -111,69 +127,83 @@
   AboutText=gtk_text_new( NULL,NULL );
   gtk_widget_set_name( AboutText,"AboutText" );
   gtk_widget_ref( AboutText );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"AboutText",AboutText,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"AboutText",AboutText,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( AboutText );
   gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
   gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL,
-                   "\nMPlayer code:\n" \
-                   "       fileformat detection,demuxers - A'rpi\n" \
-                   "       DVD support - ( alpha version was: LGB ) now: ?\n" \
-                   "       network streaming - Bertrand BAUDET\n" \
-                   "       A-V sync code - A'rpi\n" \
-                   "       subtitles file parser/reader - Lez( most of them )\n" \
-                   "       config files & commandline parser - Szabi\n" \
-                   "       fastmemcpy - Nick Kurshev\n" \
-                   "       LIRC support - Acki\n" \
-                   "       SUB/OSD renderer - Adam Tla/lka\n" \
-                   "       Gui - Pontscho\n\nlibvo drivers:\n" \
-                   "       vo_aa.c - Folke Ashberg\n" \
-                   "       vo_dga.c - Acki\n" \
-                   "       vo_fbdev.c - Szabi\n" \
-                   "       vo_ggi.c - al3x\n" \
-                   "       vo_gl.c - A'rpi\n" \
-                   "       vo_md5.c - A'rpi\n" \
-                   "       vo_mga.c - A'rpi\n" \
-                   "       vo_null.c - A'rpi\n" \
-                   "       vo_odivx.c - A'rpi\n" \
-                   "       vo_pgm.c - A'rpi\n" \
-                   "       vo_png.c - Atmos\n" \
-                   "       vo_sdl.c - Atmos\n" \
-                   "       vo_svga.c - se7en\n" \
-                   "       vo_x11.c - Pontscho\n"\
-                   "       vo_xmga.c - Pontscho\n"\
-                   "       vo_xv.c - Pontscho\n" \
-                   "       vo_aa.c - Folke Ashberg\n\n" \
-                   "libao2 drivers:\n" \
-                   "       ao_alsa5.c - al3x\n" \
-                   "       ao_alsa9.c - al3x( BUGGY,use oss )\n" \
-                   "       ao_null.c - A'rpi\n" \
-                   "       ao_oss.c - A'rpi\n" \
-                   "       ao_pcm.c - Atmos\n" \
-                   "       ao_sdl.c - Atmos\n" \
-                   "       ao_sun.c - Jürgen Keil\n\n" \
-                   "Homepage:\n" \
-                   "        Design:  Chass\n" \
-                   "        Contents: Gabucino\n" \
-                   "                  LGB\n\n" \
-                   "English documentation:\n" \
-                   "        tech-*.txt: A'rpi\n" \
-                   "        all the others: Gabucino\n\n" \
-                   "Documentation translations:\n" \
-                   "       Hungarian - Gabucino\n" \
-                   "       Spanish - TeLeNiEkO\n" \
-                   "       Russian - Nick Kurshev\n" \
-                   "       Polish - Dariush Pietrzak\n" \
-                   "       German - Atmosfear\n\n" \
-                   "Platforms/ports:\n" \
-                   "       DEBIAN packaging - Dariush Pietrzak\n" \
-                   "       FreeBSD support - Vladimir Kushnir\n" \
-                   "       Solaris 8 support - Jürgen Keil\n",1535 );
+	"\n" \
+	"   MPlayer core team:\n" \
+	"\n" \
+	"     * Arpad Gereoffy (A'rpi/ESP-team)\n" \
+	"     * Zoltan Ponekker (Pontscho/Fresh!mindworkz)\n" \
+	"     * Gabor Berczi (Gabucino)\n" \
+	"     * Alex Beregszaszi (al3x)\n" \
+	"     * Gabor Lenart (LGB)\n" \
+	"     * Felix Bunemann (Atmos)\n" \
+	"     * Alban Bedel (Albeu)\n" \
+	"     * pl\n" \
+	"     * Michael Niedermayer\n" \
+	"\n" \
+	"   Additional codes:\n" \
+	"\n" \
+	"     * Szabolcs Berecz (Szabi)\n" \
+	"     * Laszlo Megyer (Lez, Laaz)\n" \
+	"     * Gyula Laszlo (Chass, Tegla)\n" \
+	"     * Zoltan Mark Vician (Se7en)\n" \
+	"     * Andreas Ackermann (Acki)\n" \
+	"     * TeLeNiEkO\n" \
+	"     * Michael Graffam\n" \
+	"     * Jens Hoffmann\n" \
+	"     * German Gomez Garcia\n" \
+	"     * Dariusz Pietrzak (Eyck)\n" \
+	"     * Marcus Comstedt\n" \
+	"     * Jurgen Keil\n" \
+	"     * Vladimir Kushnir\n" \
+	"     * Bertrand BAUDET\n" \
+	"     * Derek J Witt\n" \
+	"     * Artur Zaprzala\n" \
+	"     * lanzz@lanzz.org\n" \
+	"     * Adam Tla/lka\n" \
+	"     * Folke Ashberg\n" \
+	"     * Kamil Toman\n" \
+	"     * Ivan Kalvatchev\n" \
+	"     * Sven Goethel\n" \
+	"     * joy_ping\n" \
+	"     * Eric Anholt\n" \
+	"     * Jiri Svoboda\n" \
+	"     * Oliver Schoenbrunner\n" \
+	"     * Jeroen Dobbelaere\n" \
+	"     * David Holm\n" \
+	"     * Panagiotis Issaris\n" \
+	"     * Mike Melanson\n" \
+	"     * Tobias Diedrich\n" \
+	"     * Kilian A. Foth\n" \
+	"     * Tim Ferguson\n" \
+	"     * Sam Lin\n" \
+	"     * Johannes Feigl\n" \
+	"     * Kim Minh Kaplan\n" \
+	"     * Brian Kuschak\n" \
+	"     * Stephen Davies\n" \
+	"     * Rik Snel\n" \
+	"     * Anders Johansson\n" \
+	"     * Roberto Togni\n" \
+	"     * Wojtek Kaniewski\n" \
+	"     * Fredrik Kuivinen\n" \
+	"\n" \
+	"   Main testers:\n" \
+	"\n" \
+	"     * Tibor Balazs (Tibcu)\n" \
+	"     * Peter Sasi (SaPe)\n" \
+	"     * Christoph H. Lampert\n" \
+	"     * Attila Kinali\n" \
+	"     * Dirk Vornheder\n" \
+	"     * Bohdan Horst (Nexus)\n" \
+	"\n",1481 );
 
-  hseparator1=gtk_hseparator_new( );
+  hseparator1=gtk_hseparator_new();
   gtk_widget_set_name( hseparator1,"hseparator1" );
   gtk_widget_ref( hseparator1 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator1",hseparator1,
-                           ( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator1",hseparator1,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( hseparator1 );
   gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator1,FALSE,FALSE,0 );
   gtk_widget_set_usize( hseparator1,-2,10 );
@@ -181,8 +211,7 @@
   hbuttonbox1=gtk_hbutton_box_new( );
   gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
   gtk_widget_ref( hbuttonbox1 );
-  gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox1",hbuttonbox1,
-                           ( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_set_usize( hbuttonbox1,-2,25 );
   gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),75,0 );
   gtk_widget_show( hbuttonbox1 );
@@ -191,12 +220,14 @@
   Ok=gtk_button_new_with_label( MSGTR_Ok );
   gtk_widget_set_name( Ok,MSGTR_Ok );
   gtk_widget_ref( Ok );
-  gtk_object_set_data_full( GTK_OBJECT( About ),MSGTR_Ok,Ok,( GtkDestroyNotify ) gtk_widget_unref );
+  gtk_object_set_data_full( GTK_OBJECT( About ),MSGTR_Ok,Ok,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( Ok );
   gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
 
-  gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL );
-  gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL );
+  gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),0 );
+  gtk_signal_connect( GTK_OBJECT( About ),"show",GTK_SIGNAL_FUNC( ab_AboutBox_show ),1 );
+  gtk_signal_connect( GTK_OBJECT( About ),"hide",GTK_SIGNAL_FUNC( ab_AboutBox_show ),0 );
+  gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),0 );
 
   gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
   gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
--- a/Gui/mplayer/gtk/about.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/about.h	Mon May 20 13:56:16 2002 +0000
@@ -4,6 +4,9 @@
 
 #include <gtk/gtk.h>
 
+extern GtkWidget * AboutBox;
+
 extern GtkWidget * create_About( void );
+extern void ShowAboutBox( void );
 
 #endif
--- a/Gui/mplayer/gtk/fs.c	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/fs.c	Mon May 20 13:56:16 2002 +0000
@@ -38,6 +38,8 @@
 int             fsMessage = -1;
 int             fsType    = 0;
 
+int gtkVFileSelect = 0;
+
 #define fsNumberOfVideoFilterNames 9
 char * fsVideoFilterNames[fsNumberOfVideoFilterNames+1][2] =
          { { "MPEG files (*.mpg,*.mpeg)",                               "*.mpg,*.mpeg" },
@@ -186,7 +188,9 @@
 void ShowFileSelect( int type )
 {
  int i;
- FileSelect=create_FileSelect();
+
+ if ( gtkVFileSelect ) gtkActive( fsFileSelect );
+  else fsFileSelect=create_FileSelect();
  
  if ( FirstInit )
   {
@@ -231,11 +235,15 @@
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[fsNumberOfOtherFilterNames][0] );
         break;
   }
- gtk_widget_show( FileSelect );
+ gtk_widget_show( fsFileSelect );
 }
 
 void HideFileSelect( void )
-{ gtk_widget_destroy( fsFileSelect ); }
+{
+ gtk_widget_hide( fsFileSelect );
+ gtk_widget_destroy( fsFileSelect );
+ gtkVFileSelect=0;
+}
 
 void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data )
 { HideFileSelect(); }
@@ -336,8 +344,6 @@
    return;
   }
 
- HideFileSelect();
-
  switch( fsPressed )
   {
    case 1:
@@ -346,7 +352,7 @@
    case 2:
         str=gtk_entry_get_text( GTK_ENTRY( fsPathCombo ) );
         fsSelectedFile=str;
-        if ( !fsFileExist( fsSelectedFile ) ) return;
+        if ( !fsFileExist( fsSelectedFile ) ) { HideFileSelect(); return; }
         fsSelectedDirectory=fsSelectedFile;
         size=strlen( fsSelectedDirectory );
         for ( j=0;j<size;j++ )
@@ -375,6 +381,9 @@
           guiSetDF( guiIntfStruct.Othername,fsSelectedDirectory,fsSelectedFile );
           break;
   }
+
+ HideFileSelect();
+
  item=fsTopList_items;
  while( item )
   {
@@ -413,6 +422,9 @@
  return FALSE;
 }
 
+void fs_FileSelect_show( GtkWidget * widget,gpointer user_data )
+{ gtkVFileSelect=(int)user_data; }
+
 GtkWidget * create_FileSelect( void )
 {
  GtkWidget     * FSFrame;
@@ -639,6 +651,10 @@
 
  gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",GTK_SIGNAL_FUNC( fs_fsFileSelect_destroy ),NULL );
  gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL );
+
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"show",GTK_SIGNAL_FUNC( fs_FileSelect_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"hide",GTK_SIGNAL_FUNC( fs_FileSelect_show ),0 );
+
  gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsFilterCombo_changed ),fsFilterCombo );
  gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsFilterCombo_activate ),fsFilterCombo );
  gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsPathCombo_changed ),fsPathCombo );
--- a/Gui/mplayer/gtk/fs.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/fs.h	Mon May 20 13:56:16 2002 +0000
@@ -7,6 +7,8 @@
 #define fsSubtitleSelector 1
 #define fsOtherSelector    2
 
+extern GtkWidget   * fsFileSelect;
+
 extern void HideFileSelect( void );
 extern void ShowFileSelect( int type );
 
--- a/Gui/mplayer/gtk/mb.c	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/mb.c	Mon May 20 13:56:16 2002 +0000
@@ -10,9 +10,22 @@
 #include "mb.h"
 
 GtkWidget * gtkMessageBoxText;
+GtkWidget * MessageBox;
 
-static void on_MessageBox_Ok_released( GtkButton * button,gpointer user_data  )
-{ gtk_widget_destroy( MessageBox ); }
+int gtkVMessageBox = 0;
+
+void ShowMessageBox( char * msg )
+{
+ if ( gtkVMessageBox ) gtkActive( MessageBox );
+   else MessageBox=create_MessageBox( 0 );
+ if ( strlen( msg ) < 20 ) gtk_widget_set_usize( MessageBox,196,-1 );
+}
+
+static void on_Ok_released( GtkButton * button,gpointer user_data  )
+{ gtkVMessageBox=0; gtk_widget_destroy( MessageBox ); }
+
+static void on_MessageBox_show( GtkButton * button,gpointer user_data  )
+{ gtkVMessageBox=(int)user_data; }
 
 GtkWidget * create_MessageBox( int type )
 {
@@ -45,7 +58,7 @@
  frame1=gtk_frame_new( NULL );
  gtk_widget_set_name( frame1,"frame1" );
  gtk_widget_ref( frame1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame1",frame1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame1",frame1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame1 );
  gtk_container_add( GTK_CONTAINER( MessageBox ),frame1 );
  gtk_container_set_border_width( GTK_CONTAINER( frame1 ),1 );
@@ -54,7 +67,7 @@
  frame2=gtk_frame_new( NULL );
  gtk_widget_set_name( frame2,"frame2" );
  gtk_widget_ref( frame2 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame2",frame2,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame2",frame2,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame2 );
  gtk_container_add( GTK_CONTAINER( frame1 ),frame2 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
@@ -62,7 +75,7 @@
  frame3=gtk_frame_new( NULL );
  gtk_widget_set_name( frame3,"frame3" );
  gtk_widget_ref( frame3 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame3",frame3,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame3",frame3,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame3 );
  gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT );
@@ -70,7 +83,7 @@
  frame4=gtk_frame_new( NULL );
  gtk_widget_set_name( frame4,"frame4" );
  gtk_widget_ref( frame4 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame4",frame4,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame4",frame4,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame4 );
  gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
@@ -78,22 +91,22 @@
  vbox1=gtk_vbox_new( FALSE,0 );
  gtk_widget_set_name( vbox1,"vbox1" );
  gtk_widget_ref( vbox1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox1",vbox1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox1",vbox1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( vbox1 );
  gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
 
  hbox1=gtk_hbox_new( FALSE,0 );
  gtk_widget_set_name( hbox1,"hbox1" );
  gtk_widget_ref( hbox1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbox1",hbox1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbox1",hbox1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hbox1 );
  gtk_box_pack_start( GTK_BOX( vbox1 ),hbox1,TRUE,TRUE,0 );
 
  pixmapstyle=gtk_widget_get_style( MessageBox );
 
- pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system( ),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )warning_xpm );
+ pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )warning_xpm );
  WarningPixmap=gtk_pixmap_new( pixmapwid,mask );
- pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system( ),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm );
+ pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm );
  ErrorPixmap=gtk_pixmap_new( pixmapwid,mask );
 
  gtk_widget_set_name( WarningPixmap,"pixmap1" );
@@ -113,24 +126,24 @@
  gtkMessageBoxText=gtk_label_new( "Text jol. Ha ezt megerted,akkor neked nagyon jo a magyar tudasod,te." );
  gtk_widget_set_name( gtkMessageBoxText,"gtkMessageBoxText" );
  gtk_widget_ref( gtkMessageBoxText );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"gtkMessageBoxText",gtkMessageBoxText,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"gtkMessageBoxText",gtkMessageBoxText,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( gtkMessageBoxText );
  gtk_box_pack_start( GTK_BOX( hbox1 ),gtkMessageBoxText,TRUE,TRUE,0 );
  gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_FILL );
- gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),TRUE );
+ gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),FALSE );
 
- hseparator1=gtk_hseparator_new( );
+ hseparator1=gtk_hseparator_new();
  gtk_widget_set_name( hseparator1,"hseparator1" );
  gtk_widget_ref( hseparator1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hseparator1",hseparator1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hseparator1",hseparator1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hseparator1 );
  gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator1,FALSE,FALSE,0 );
  gtk_widget_set_usize( hseparator1,-2,9 );
 
- hbuttonbox1=gtk_hbutton_box_new( );
+ hbuttonbox1=gtk_hbutton_box_new();
  gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
  gtk_widget_ref( hbuttonbox1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hbuttonbox1 );
  gtk_widget_set_usize( hbuttonbox1,-2,25 );
  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),75,0 );
@@ -139,14 +152,16 @@
  Ok=gtk_button_new_with_label( MSGTR_Ok );
  gtk_widget_set_name( Ok,MSGTR_Ok );
  gtk_widget_ref( Ok );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),MSGTR_Ok,Ok,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),MSGTR_Ok,Ok,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( Ok );
  gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
  gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
  gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
 
- gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy_event",GTK_SIGNAL_FUNC( on_MessageBox_Ok_released ),NULL );
- gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_MessageBox_Ok_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy_event",GTK_SIGNAL_FUNC( on_Ok_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"show",GTK_SIGNAL_FUNC( on_MessageBox_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"hide",GTK_SIGNAL_FUNC( on_MessageBox_show ),0 );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_Ok_released ),NULL );
 
  gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group );
 
--- a/Gui/mplayer/gtk/mb.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/mb.h	Mon May 20 13:56:16 2002 +0000
@@ -5,7 +5,9 @@
 #include <gtk/gtk.h>
 
 extern GtkWidget * gtkMessageBoxText;
+extern GtkWidget * MessageBox;
 
 extern GtkWidget * create_MessageBox( int type );
+extern void ShowMessageBox( char * msg );
 
 #endif
--- a/Gui/mplayer/gtk/sb.c	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/sb.c	Mon May 20 13:56:16 2002 +0000
@@ -22,6 +22,21 @@
 char * gtkOldSkin;
 static char * prev;
 
+int         gtkVSkinBrowser = 0;
+GtkWidget * SkinBrowser;
+
+void ShowSkinBrowser( void )
+{
+ if ( gtkVSkinBrowser ) gtkActive( SkinBrowser );
+   else SkinBrowser=create_SkinBrowser();
+}
+
+void HideSkinBrowser( void )
+{
+ gtkVSkinBrowser=0;
+ gtk_widget_destroy( SkinBrowser );
+}
+
 int gtkFillSkinList( gchar * mdir )
 {
  gchar         * str[2];
@@ -62,12 +77,15 @@
 }
 
 void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
-{ gtk_widget_destroy( SkinBrowser ); }
+{ HideSkinBrowser(); }
+
+void on_SkinBrowser_show( GtkObject * object,gpointer user_data )
+{ gtkVSkinBrowser=(int)user_data; }
 
 void on_SkinBrowser_Cancel( GtkObject * object,gpointer user_data )
 {
  if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
- gtk_widget_destroy( SkinBrowser );
+ HideSkinBrowser();
 }
 
 void on_SkinBrowser_Ok( GtkObject * object,gpointer user_data )
@@ -75,7 +93,7 @@
  ChangeSkin( sbSelectedSkin );
  if ( skinName ) free( skinName );
  skinName=strdup( sbSelectedSkin );
- gtk_widget_destroy( SkinBrowser );
+ HideSkinBrowser();
 }
 
 void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
@@ -91,7 +109,7 @@
   {
    if ( skinName ) free( skinName );
    skinName=strdup( sbSelectedSkin );
-   gtk_widget_destroy( SkinBrowser );
+   HideSkinBrowser();
   }
 }
 
@@ -130,8 +148,7 @@
  frame5=gtk_frame_new( NULL );
  gtk_widget_set_name( frame5,"frame5" );
  gtk_widget_ref( frame5 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame5",frame5,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame5",frame5,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame5 );
  gtk_container_add( GTK_CONTAINER( SkinBrowser ),frame5 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame5 ),GTK_SHADOW_IN );
@@ -139,8 +156,7 @@
  frame6=gtk_frame_new( NULL );
  gtk_widget_set_name( frame6,"frame6" );
  gtk_widget_ref( frame6 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame6",frame6,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame6",frame6,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame6 );
  gtk_container_add( GTK_CONTAINER( frame5 ),frame6 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame6 ),GTK_SHADOW_NONE );
@@ -148,8 +164,7 @@
  frame7=gtk_frame_new( NULL );
  gtk_widget_set_name( frame7,"frame7" );
  gtk_widget_ref( frame7 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame7",frame7,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame7",frame7,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame7 );
  gtk_container_add( GTK_CONTAINER( frame6 ),frame7 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame7 ),GTK_SHADOW_ETCHED_OUT );
@@ -157,8 +172,7 @@
  frame8=gtk_frame_new( NULL );
  gtk_widget_set_name( frame8,"frame8" );
  gtk_widget_ref( frame8 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame8",frame8,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame8",frame8,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame8 );
  gtk_container_add( GTK_CONTAINER( frame7 ),frame8 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame8 ),GTK_SHADOW_NONE );
@@ -166,16 +180,14 @@
  vbox5=gtk_vbox_new( FALSE,0 );
  gtk_widget_set_name( vbox5,"vbox5" );
  gtk_widget_ref( vbox5 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"vbox5",vbox5,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"vbox5",vbox5,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( vbox5 );
  gtk_container_add( GTK_CONTAINER( frame8 ),vbox5 );
 
  label=gtk_label_new( MSGTR_SKIN_LABEL );
  gtk_widget_set_name( label,"label" );
  gtk_widget_ref( label );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label",label,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label",label,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( label );
  gtk_box_pack_start( GTK_BOX( vbox5 ),label,FALSE,FALSE,0 );
  gtk_label_set_justify( GTK_LABEL( label ),GTK_JUSTIFY_RIGHT );
@@ -184,8 +196,7 @@
  hseparator4=gtk_hseparator_new();
  gtk_widget_set_name( hseparator4,"hseparator4" );
  gtk_widget_ref( hseparator4 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator4",hseparator4,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator4",hseparator4,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hseparator4 );
  gtk_box_pack_start( GTK_BOX( vbox5 ),hseparator4,FALSE,TRUE,0 );
  gtk_widget_set_usize( hseparator4,-2,5 );
@@ -193,8 +204,7 @@
  scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
  gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
  gtk_widget_ref( scrolledwindow1 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( scrolledwindow1 );
  gtk_box_pack_start( GTK_BOX( vbox5 ),scrolledwindow1,TRUE,TRUE,0 );
  gtk_container_set_border_width( GTK_CONTAINER( scrolledwindow1 ),2 );
@@ -203,8 +213,7 @@
  SkinList=gtk_clist_new( 1 );
  gtk_widget_set_name( SkinList,"SkinList" );
  gtk_widget_ref( SkinList );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( SkinList );
  gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),SkinList );
  gtk_clist_set_column_width( GTK_CLIST( SkinList ),0,80 );
@@ -256,7 +265,10 @@
  gtk_widget_set_usize( Cancel,-2,22 );
  gtk_widget_add_accelerator( Cancel,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
 
- gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),NULL );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),0 );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"show",GTK_SIGNAL_FUNC( on_SkinBrowser_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"hide",GTK_SIGNAL_FUNC( on_SkinBrowser_show ),0 );
+ 
  gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",GTK_SIGNAL_FUNC( on_SkinList_select_row ),NULL );
  gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_Ok ),NULL );
  gtk_signal_connect( GTK_OBJECT( Cancel ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_Cancel ),NULL );
--- a/Gui/mplayer/gtk/sb.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/gtk/sb.h	Mon May 20 13:56:16 2002 +0000
@@ -7,8 +7,9 @@
 extern char      * sbSelectedSkin;
 extern char      * sbMPlayerDirInHome;
 extern char      * sbMPlayerPrefixDir;
+extern GtkWidget * SkinBrowser;
 
-extern void HideSkinBrowser( void );
+extern void ShowSkinBrowser( void );
 extern int gtkFillSkinList( gchar * mdir );
 extern GtkWidget * create_SkinBrowser( void );
 
--- a/Gui/mplayer/menu.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/menu.h	Mon May 20 13:56:16 2002 +0000
@@ -79,7 +79,7 @@
  mplMenuItem = 0;
 
  wsMoveWindow( &appMPlayer.menuWindow,False,x,y );
- wsMoveTopWindow( &appMPlayer.menuWindow );
+ wsMoveTopWindow( wsDisplay,appMPlayer.menuWindow.WindowID );
  mplMenuRender=1;
  wsVisibleWindow( &appMPlayer.menuWindow,wsShowWindow );
  wsPostRedisplay( &appMPlayer.menuWindow );
--- a/Gui/mplayer/play.c	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/play.c	Mon May 20 13:56:16 2002 +0000
@@ -209,7 +209,8 @@
  if ( mplDrawBuffer ) free( mplDrawBuffer );
  if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
   { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
- wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
+
+ if ( wsWMType == wsWMUnknown ) wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
  wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
  wsMoveWindow( &appMPlayer.mainWindow,True,appMPlayer.main.x,appMPlayer.main.y );
  wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
--- a/Gui/mplayer/sw.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/sw.h	Mon May 20 13:56:16 2002 +0000
@@ -64,8 +64,8 @@
    case wsRLMouseButton:
           if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) )
            {
-            if( SubVisible++%2 ) wsMoveTopWindow( &appMPlayer.mainWindow );
-             else wsMoveTopWindow( &appMPlayer.subWindow );
+            if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID );
+             else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
 	   }
           msButton=0;
           mplSubMoved=0;
--- a/Gui/mplayer/widgets.c	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/widgets.c	Mon May 20 13:56:16 2002 +0000
@@ -27,15 +27,10 @@
 #include "../../config.h"
 #include "../../help_mp.h"
 
-GtkWidget     * SkinBrowser;
 GtkWidget     * PlayList;
-GtkWidget     * FileSelect;
-GtkWidget     * AboutBox;
 GtkWidget     * Options;
 GtkWidget     * PopUpMenu = NULL;
 
-GtkWidget     * MessageBox;
-
 GtkWidget     * WarningPixmap;
 GtkWidget     * ErrorPixmap;
 
@@ -58,14 +53,7 @@
  mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init gtk ...\n" );
  gtk_set_locale();
  gtk_init( &argc,&argv );
- gdk_set_use_xshm( FALSE );
- 
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create about box.\n" );              AboutBox=create_About();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create skin browser.\n" );           SkinBrowser=create_SkinBrowser();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create playlist.\n" );               PlayList=create_PlayList();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create file selector.\n" );          FileSelect=create_FileSelect();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create message box.\n" );            MessageBox=create_MessageBox(0);
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create preferences dialog box.\n" ); Options=create_Options();
+// gdk_set_use_xshm( TRUE );
  
  gtkInited=1;
 }
@@ -106,7 +94,7 @@
 void gtkMessageBox( int type,gchar * str )
 {
  if ( !gtkInited ) return;
- MessageBox=create_MessageBox(0);
+ ShowMessageBox( str );
  gtk_label_set_text( GTK_LABEL( gtkMessageBoxText ),str );
  switch( type)
   {
@@ -135,45 +123,53 @@
  wsSetLayer( gdk_display,win->xwindow,appMPlayer.subWindow.isFullScreen );
 }
 
+void gtkActive( GtkWidget * wdg )
+{
+ GdkWindowPrivate * win = wdg->window;
+ wsMoveTopWindow( gdk_display,win->xwindow );
+}
+
 void gtkShow( int type,char * param )
 {
  switch( type )
   {
    case evSkinBrowser:
-	SkinBrowser=create_SkinBrowser();
+//	SkinBrowser=create_SkinBrowser();
+	ShowSkinBrowser();
 //        gtkClearList( SkinList );
         if ( gtkFillSkinList( sbMPlayerPrefixDir ) && gtkFillSkinList( sbMPlayerDirInHome ) )
          {
           gtkSetDefaultToCList( SkinList,param );
           gtk_widget_show( SkinBrowser );
 	  gtkSetLayer( SkinBrowser );
-         }
+         } else gtk_widget_destroy( SkinBrowser );
         break;
    case evPreferences:
-	Options=create_Options();
-        gtk_widget_show( Options );
-	gtkSetLayer( Options );
+        gtkMessageBox( GTK_MB_WARNING,"Sorry, this feature is under development ..." );
+//	Options=create_Options();
+//        gtk_widget_show( Options );
+//	gtkSetLayer( Options );
         break;
    case evPlayList:
-	PlayList=create_PlayList();
-        gtk_widget_show( PlayList );
-	gtkSetLayer( PlayList );
+        gtkMessageBox( GTK_MB_WARNING,"Sorry, this feature is under development ..." );
+//	PlayList=create_PlayList();
+//        gtk_widget_show( PlayList );
+//	gtkSetLayer( PlayList );
         break;
    case evLoad:
         ShowFileSelect( fsVideoSelector );
-	gtkSetLayer( FileSelect );
+	gtkSetLayer( fsFileSelect );
         break;
    case evFirstLoad:
         ShowFileSelect( fsVideoSelector );
-	gtkSetLayer( FileSelect );
+	gtkSetLayer( fsFileSelect );
         break;
    case evLoadSubtitle:
         ShowFileSelect( fsSubtitleSelector );
-	gtkSetLayer( FileSelect );
+	gtkSetLayer( fsFileSelect );
         break;
    case evAbout:
-	AboutBox=create_About();
-        gtk_widget_show( AboutBox );
+	ShowAboutBox();
 	gtkSetLayer( AboutBox );
         break;
    case evShowPopUpMenu:
--- a/Gui/mplayer/widgets.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/mplayer/widgets.h	Mon May 20 13:56:16 2002 +0000
@@ -19,15 +19,10 @@
 #define GTK_MB_ERROR 4
 #define GTK_MB_WARNING 8
 
-extern GtkWidget     * SkinBrowser;
 extern GtkWidget     * PlayList;
-extern GtkWidget     * FileSelect;
-extern GtkWidget     * AboutBox;
 extern GtkWidget     * Options;
 extern GtkWidget     * PopUpMenu;
 
-extern GtkWidget     * MessageBox;
-
 extern GtkWidget     * WarningPixmap;
 extern GtkWidget     * ErrorPixmap;
 
@@ -54,5 +49,7 @@
 
 extern void gtkShow( int type,char * param );
 extern void gtkMessageBox( int type,gchar * str );
+extern void gtkSetLayer( GtkWidget * wdg );
+extern void gtkActive( GtkWidget * wdg );
 
 #endif
--- a/Gui/wm/ws.c	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/wm/ws.c	Mon May 20 13:56:16 2002 +0000
@@ -810,8 +810,6 @@
 {
  int decoration = 0;
  
- if ( wsWMType == wsWMUnknown ) XUnmapWindow( wsDisplay,win->WindowID );
-
  switch ( wsWMType )
    {
     case wsWMUnknown:
@@ -990,13 +988,13 @@
 // ----------------------------------------------------------------------------------------------
 //    Move top the window.
 // ----------------------------------------------------------------------------------------------
-void wsMoveTopWindow( wsTWindow * win )
+void wsMoveTopWindow( Display * wsDisplay,Window win )
 {
  switch ( wsWMType )
   {
    case wsWMIceWM:
-	  XUnmapWindow( wsDisplay,win->WindowID );
-	  XMapWindow( wsDisplay,win->WindowID );
+	  XUnmapWindow( wsDisplay,win );
+	  XMapWindow( wsDisplay,win );
 	  break;
    case wsWMNetWM:
    case wsWMKDE:
@@ -1005,15 +1003,15 @@
 	  e.xclient.type=ClientMessage;
 	  e.xclient.message_type=XInternAtom( wsDisplay,"_NET_ACTIVE_WINDOW",False );
 	  e.xclient.display=wsDisplay;
-	  e.xclient.window=win->WindowID;
+	  e.xclient.window=win;
 	  e.xclient.format=32;
 	  e.xclient.data.l[0]=0;
-	  XSendEvent( wsDisplay,wsRootWin,False,SubstructureRedirectMask,&e );
+	  XSendEvent( wsDisplay,RootWindow( wsDisplay,DefaultScreen( wsDisplay ) ),False,SubstructureRedirectMask,&e );
 	  break;
 	 }
    default:
-         XMapRaised( wsDisplay,win->WindowID );
-	 XRaiseWindow( wsDisplay,win->WindowID );
+         XMapRaised( wsDisplay,win );
+	 XRaiseWindow( wsDisplay,win );
          break;
   }
 }
--- a/Gui/wm/ws.h	Mon May 20 13:39:23 2002 +0000
+++ b/Gui/wm/ws.h	Mon May 20 13:56:16 2002 +0000
@@ -220,7 +220,7 @@
 extern void wsMoveWindow( wsTWindow * win,int b,int x, int y );
 extern void wsResizeWindow( wsTWindow * win,int sx, int sy );
 extern void wsIconify( wsTWindow win );
-extern void wsMoveTopWindow( wsTWindow * win );
+extern void wsMoveTopWindow( Display * wsDisplay,Window win );
 extern void wsSetBackground( wsTWindow * win,int color );
 extern void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b );
 extern void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b );