[MPlayer-cvslog] r34035 - trunk/gui/ui/main.c

ib subversion at mplayerhq.hu
Thu Sep 1 19:27:44 CEST 2011


Author: ib
Date: Thu Sep  1 19:27:44 2011
New Revision: 34035

Log:
Modify video window size change behavior.

Allow a size change of the video window only if there is a (visible) window and
change the "fullscreen" button only if a change in size actually has occurred.

Modified:
   trunk/gui/ui/main.c

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Thu Sep  1 19:16:49 2011	(r34034)
+++ trunk/gui/ui/main.c	Thu Sep  1 19:27:44 2011	(r34035)
@@ -331,8 +331,7 @@ set_volume:
          }
         break;
    case evHalfSize:
-        btnSet( evFullScreen,btnReleased );
-        if ( guiInfo.Playing )
+        if ( guiInfo.VideoWindow && guiInfo.Playing )
          {
           if ( guiApp.subWindow.isFullScreen )
            {
@@ -342,11 +341,11 @@ set_volume:
           wsMoveWindow( &guiApp.subWindow, False,
                         ( wsMaxX - guiInfo.VideoWidth/2  )/2 + wsOrgX,
                         ( wsMaxY - guiInfo.VideoHeight/2 )/2 + wsOrgY  );
+         btnSet( evFullScreen,btnReleased );
          }
         break;
    case evDoubleSize:
-    	btnSet( evFullScreen,btnReleased );
-        if ( guiInfo.Playing )
+        if ( guiInfo.VideoWindow && guiInfo.Playing )
          {
           if ( guiApp.subWindow.isFullScreen )
            {
@@ -356,11 +355,11 @@ set_volume:
           wsMoveWindow( &guiApp.subWindow, False,
                         ( wsMaxX - guiInfo.VideoWidth*2  )/2 + wsOrgX,
                         ( wsMaxY - guiInfo.VideoHeight*2 )/2 + wsOrgY  );
+         btnSet( evFullScreen,btnReleased );
          }
         break;
    case evNormalSize:
-	btnSet( evFullScreen,btnReleased );
-        if ( guiInfo.Playing )
+        if ( guiInfo.VideoWindow && guiInfo.Playing )
          {
           if ( guiApp.subWindow.isFullScreen )
            {
@@ -370,11 +369,14 @@ set_volume:
           wsMoveWindow( &guiApp.subWindow, False,
                         ( wsMaxX - guiInfo.VideoWidth  )/2 + wsOrgX,
                         ( wsMaxY - guiInfo.VideoHeight )/2 + wsOrgY  );
+          btnSet( evFullScreen,btnReleased );
 	  break;
          } else if ( !guiApp.subWindow.isFullScreen ) break;
    case evFullScreen:
-        if ( !guiInfo.Playing && !gtkShowVideoWindow ) break;
+        if ( guiInfo.VideoWindow && guiInfo.Playing )
+         {
         uiFullScreen();
+         }
 	if ( guiApp.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
 	 else btnSet( evFullScreen,btnReleased );
         break;


More information about the MPlayer-cvslog mailing list