[Mplayer-cvslog] CVS: main/Gui/mplayer play.c,1.59,1.60 sw.h,1.29,1.30 widgets.c,1.20,1.21

Zoltan Ponekker pontscho at mplayerhq.hu
Mon May 6 17:05:09 CEST 2002


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

Modified Files:
	play.c sw.h widgets.c 
Log Message:
add WM detection, and wm specific fullscreen code. (???)

Index: play.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- play.c	5 May 2002 18:46:42 -0000	1.59
+++ play.c	6 May 2002 15:05:06 -0000	1.60
@@ -54,9 +54,26 @@
    wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
   }// else { vo_x11_fullscreen(); appMPlayer.subWindow.isFullScreen=vo_fs; }
 #else
+  if ( ( guiIntfStruct.Playing )&&( appMPlayer.subWindow.isFullScreen ) )
+   { 
+    appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight; 
+    switch ( appMPlayer.sub.x )
+     {
+      case -1: appMPlayer.subWindow.OldX=( wsMaxX / 2 ) - ( appMPlayer.subWindow.OldWidth / 2 ); break;
+      case -2: appMPlayer.subWindow.OldX=wsMaxX - appMPlayer.subWindow.OldWidth; break;
+      default: appMPlayer.subWindow.OldX=appMPlayer.sub.x; break;
+     }
+    switch ( appMPlayer.sub.y )
+     {
+      case -1: appMPlayer.subWindow.OldY=( wsMaxY / 2 ) - ( appMPlayer.subWindow.OldHeight / 2 ); break;
+      case -2: appMPlayer.subWindow.OldY=wsMaxY - appMPlayer.subWindow.OldHeight; break;
+      default: appMPlayer.subWindow.OldY=appMPlayer.sub.y; break;
+     }
+   }
   wsFullScreen( &appMPlayer.subWindow );
-  vo_fs=0;
-  if ( appMPlayer.subWindow.isFullScreen ) vo_fs=1;
+  vo_fs=appMPlayer.subWindow.isFullScreen;
+  wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen );
+  wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen );
 #endif
 
  fullscreen=appMPlayer.subWindow.isFullScreen;

Index: sw.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/sw.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- sw.h	1 May 2002 09:28:51 -0000	1.29
+++ sw.h	6 May 2002 15:05:06 -0000	1.30
@@ -44,13 +44,6 @@
           break;
 // ---
    case wsPLMouseButton:
-          if ( appMPlayer.subWindow.isFullScreen )
-           {
-            if( ++SubVisible%2 ) wsMoveTopWindow( &appMPlayer.mainWindow );
-             else wsMoveTopWindow( &appMPlayer.subWindow );
-            mplSubMoved=1;
-            break;
-           }
           gtkShow( evHidePopUpMenu,NULL );
           sx=X; sy=Y;
           msButton=wsPLMouseButton;
@@ -69,32 +62,11 @@
            }
           break;
    case wsRLMouseButton:
-          if ( !mplSubMoved )
+          if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) )
            {
-#if 0
-            if( SubVisible++%2 )
-             {
-              wsMoveTopWindow( &appMPlayer.mainWindow );
-              fprintf( stderr,"[sw] MAIN TOP\n" );
-             }
-             else
-              {
-               wsMoveTopWindow( &appMPlayer.subWindow );
-               fprintf( stderr,"[sw] SUB TOP\n" );
-              }
-#else
-	    if ( appMPlayer.subWindow.Focused == 2 )
-             {
-              wsMoveTopWindow( &appMPlayer.mainWindow );
-              fprintf( stderr,"[sw] MAIN TOP\n" );
-             }
-             else
-              {
-               wsMoveTopWindow( &appMPlayer.subWindow );
-               fprintf( stderr,"[sw] SUB TOP\n" );
-              }
-#endif
-           }
+            if( SubVisible++%2 ) wsMoveTopWindow( &appMPlayer.mainWindow );
+             else wsMoveTopWindow( &appMPlayer.subWindow );
+	   }
           msButton=0;
           mplSubMoved=0;
           break;

Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- widgets.c	1 May 2002 09:28:51 -0000	1.20
+++ widgets.c	6 May 2002 15:05:06 -0000	1.21
@@ -18,6 +18,7 @@
 
 #include "./mplayer.h"
 #include "../events.h"
+#include "../app.h"
 
 #include "gtk/menu.h"
 #include "play.h"
@@ -128,6 +129,12 @@
  gtk_widget_show( MessageBox );
 }
 
+void gtkSetLayer( GtkWidget * wdg )
+{
+ GdkWindowPrivate * win = wdg->window;
+ wsSetLayer( gdk_display,win->xwindow,appMPlayer.subWindow.isFullScreen );
+}
+
 void gtkShow( int type,char * param )
 {
  switch( type )
@@ -140,27 +147,34 @@
           gtkSetDefaultToCList( SkinList,param );
           gtk_widget_show( SkinBrowser );
          }
+	gtkSetLayer( SkinBrowser );
         break;
    case evPreferences:
         gtk_widget_hide( Options );
         gtk_widget_show( Options );
+	gtkSetLayer( Options );
         break;
    case evPlayList:
         gtk_widget_hide( PlayList );
         gtk_widget_show( PlayList );
+	gtkSetLayer( PlayList );
         break;
    case evLoad:
         ShowFileSelect( fsVideoSelector );
+	gtkSetLayer( FileSelect );
         break;
    case evFirstLoad:
         ShowFileSelect( fsVideoSelector );
+	gtkSetLayer( FileSelect );
         break;
    case evLoadSubtitle:
         ShowFileSelect( fsSubtitleSelector );
+	gtkSetLayer( FileSelect );
         break;
    case evAbout:
         gtk_widget_hide( AboutBox );
         gtk_widget_show( AboutBox );
+	gtkSetLayer( AboutBox );
         break;
    case evShowPopUpMenu:
         gtkPopupMenu=evNone;
@@ -174,3 +188,5 @@
         break;
   }
 }
+
+




More information about the MPlayer-cvslog mailing list