[MPlayer-cvslog] r35699 - in trunk/gui: dialog/menu.c interface.c ui/main.c

ib subversion at mplayerhq.hu
Wed Dec 19 14:58:07 CET 2012


Author: ib
Date: Wed Dec 19 14:58:06 2012
New Revision: 35699

Log:
Fix bug with wrong video window size after end of fullscreen playback.

(This is a regression introduced in r35572.)

The normal size the window should have (media size or configured size)
depends on the current state of playback. In order to influence the
size, add a boolean parameter. This usually is True unless playback has
stopped.

Modified:
   trunk/gui/dialog/menu.c
   trunk/gui/interface.c
   trunk/gui/ui/main.c

Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c	Tue Dec 18 21:00:11 2012	(r35698)
+++ trunk/gui/dialog/menu.c	Wed Dec 19 14:58:06 2012	(r35699)
@@ -573,7 +573,7 @@ GtkWidget * create_PopUpMenu( void )
 //   SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size );
 //    AddMenuItem( SubMenu,MSGTR_MENU_NormalSize"      ", evNormalSize );
 //    AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize );
-//    AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen );
+//    AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen + ( True << 16 ) );
 
 //  if ( guiInfo.Playing )
    {
@@ -659,7 +659,7 @@ GtkWidget * create_PopUpMenu( void )
     H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize );
     N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize"      ",b1,evNormalSize );
     D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize );
-    F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.videoWindow.isFullScreen,evFullScreen );
+    F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.videoWindow.isFullScreen,evFullScreen + ( True << 16 ) );
   if ( !guiInfo.Playing )
    {
     gtk_widget_set_sensitive( H,FALSE );

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Dec 18 21:00:11 2012	(r35698)
+++ trunk/gui/interface.c	Wed Dec 19 14:58:06 2012	(r35699)
@@ -389,7 +389,7 @@ int gui(int what, void *data)
 
         switch ((int)data) {
         case MP_CMD_VO_FULLSCREEN:
-            uiEventHandling(evFullScreen, 0);
+            uiEventHandling(evFullScreen, True);
             break;
 
         case MP_CMD_PLAY_TREE_STEP:
@@ -793,7 +793,7 @@ int gui(int what, void *data)
         }
 
         if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
-            uiEventHandling(evFullScreen, 0);
+            uiEventHandling(evFullScreen, True);
 
         if (guiWinID >= 0)
             wsMoveWindow(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight);
@@ -875,7 +875,7 @@ int gui(int what, void *data)
                     wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
 
                 if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
-                    uiEventHandling(evFullScreen, 0);
+                    uiEventHandling(evFullScreen, False);
             } else {
                 wsVisibleWindow(&guiApp.videoWindow, wsHideWindow);
                 guiInfo.VideoWindow = False;

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Tue Dec 18 21:00:11 2012	(r35698)
+++ trunk/gui/ui/main.c	Wed Dec 19 14:58:06 2012	(r35699)
@@ -376,7 +376,7 @@ NoPause:
           uiFullScreen();
           if ( !guiApp.videoWindow.isFullScreen )
            {
-            wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
+            wsResizeWindow( &guiApp.videoWindow, iparam ? guiInfo.VideoWidth : guiApp.video.width, iparam ? guiInfo.VideoHeight : guiApp.video.height );
             wsMoveWindow( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
            }
          }


More information about the MPlayer-cvslog mailing list