changeset 6622:da08877b9512

fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
author pontscho
date Tue, 02 Jul 2002 21:10:42 +0000
parents dfb11bf64ea6
children 7bc4c6ba9485
files Gui/mplayer/gtk/fs.c Gui/mplayer/gtk/fs.h Gui/mplayer/sw.h Gui/mplayer/widgets.c Gui/wm/ws.c
diffstat 5 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/gtk/fs.c	Tue Jul 02 20:29:27 2002 +0000
+++ b/Gui/mplayer/gtk/fs.c	Tue Jul 02 21:10:42 2002 +0000
@@ -185,7 +185,7 @@
 
 static int FirstInit = 1;
 
-void ShowFileSelect( int type )
+void ShowFileSelect( int type,int modal )
 {
  int i;
 
@@ -235,6 +235,9 @@
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[fsNumberOfOtherFilterNames][0] );
         break;
   }
+ 
+ gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal );
+
  gtk_widget_show( fsFileSelect );
 }
 
--- a/Gui/mplayer/gtk/fs.h	Tue Jul 02 20:29:27 2002 +0000
+++ b/Gui/mplayer/gtk/fs.h	Tue Jul 02 21:10:42 2002 +0000
@@ -10,7 +10,7 @@
 extern GtkWidget   * fsFileSelect;
 
 extern void HideFileSelect( void );
-extern void ShowFileSelect( int type );
+extern void ShowFileSelect( int type, int modal );
 
 extern GtkWidget * create_FileSelect( void );
 
--- a/Gui/mplayer/sw.h	Tue Jul 02 20:29:27 2002 +0000
+++ b/Gui/mplayer/sw.h	Tue Jul 02 21:10:42 2002 +0000
@@ -9,6 +9,7 @@
  if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
  
  if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
+ if ( appMPlayer.subWindow.State == wsWindowFocusOut && wsWMType != wsWMKDE && wsWMType != wsWMIceWM ) SubVisible--;
 
  if ( !appMPlayer.subWindow.Mapped ||
       appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
@@ -64,8 +65,8 @@
           if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) )
            {
             if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID );
-             else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
-	   }
+             else if ( wsWMType != wsWMNetWM && wsWMType != wsWMKDE ) wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
+    }
           msButton=0;
           mplSubMoved=0;
           break;
--- a/Gui/mplayer/widgets.c	Tue Jul 02 20:29:27 2002 +0000
+++ b/Gui/mplayer/widgets.c	Tue Jul 02 21:10:42 2002 +0000
@@ -163,15 +163,15 @@
 //	gtkSetLayer( PlayList );
         break;
    case evLoad:
-        ShowFileSelect( fsVideoSelector );
+        ShowFileSelect( fsVideoSelector,0 );
 	gtkSetLayer( fsFileSelect );
         break;
    case evFirstLoad:
-        ShowFileSelect( fsVideoSelector );
+        ShowFileSelect( fsVideoSelector,0 );
 	gtkSetLayer( fsFileSelect );
         break;
    case evLoadSubtitle:
-        ShowFileSelect( fsSubtitleSelector );
+        ShowFileSelect( fsSubtitleSelector,0 );
 	gtkSetLayer( fsFileSelect );
         break;
    case evAbout:
--- a/Gui/wm/ws.c	Tue Jul 02 20:29:27 2002 +0000
+++ b/Gui/wm/ws.c	Tue Jul 02 21:10:42 2002 +0000
@@ -662,16 +662,16 @@
 	 if ( !strncmp( name,"_ICEWM_TRAY",11 ) )
 	  {
 	   wsWMType=wsWMIceWM;
-	   mp_dbg( MSGT_GPLAYER,MSGL_STATUS,"[ws] Detected wm is IceWM.\n" );
+//	   mp_dbg( MSGT_GPLAYER,MSGL_STATUS,"[ws] Detected wm is IceWM.\n" );
 	  }
 	 if ( !strncmp( name,"_KDE_",5 ) )
 	  {
-	   mp_dbg( MSGT_GPLAYER,MSGL_STATUS,"[ws] Detected wm is KDE.\n" );
+//	   mp_dbg( MSGT_GPLAYER,MSGL_STATUS,"[ws] Detected wm is KDE.\n" );
 	   wsWMType=wsWMKDE;
 	  }
 	 if ( !strncmp( name,"KWM_WIN_DESKTOP",15 ) )
 	  {
-	   mp_dbg( MSGT_GPLAYER,MSGL_STATUS,"[ws] Detected wm is WindowMaker style.\n" );
+//	   mp_dbg( MSGT_GPLAYER,MSGL_STATUS,"[ws] Detected wm is WindowMaker style.\n" );
 	   wsWMType=wsWMWMaker;
 	  }