changeset 35605:71f19d352561

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.
author ib
date Wed, 19 Dec 2012 13:58:06 +0000
parents 5be881b963ec
children 3faac0ea318e
files gui/dialog/menu.c gui/interface.c gui/ui/main.c
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/menu.c	Tue Dec 18 20:00:11 2012 +0000
+++ b/gui/dialog/menu.c	Wed Dec 19 13:58:06 2012 +0000
@@ -573,7 +573,7 @@
 //   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 @@
     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 );
--- a/gui/interface.c	Tue Dec 18 20:00:11 2012 +0000
+++ b/gui/interface.c	Wed Dec 19 13:58:06 2012 +0000
@@ -389,7 +389,7 @@
 
         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 @@
         }
 
         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 @@
                     wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
 
                 if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
-                    uiEventHandling(evFullScreen, 0);
+                    uiEventHandling(evFullScreen, False);
             } else {
                 wsVisibleWindow(&guiApp.videoWindow, wsHideWindow);
                 guiInfo.VideoWindow = False;
--- a/gui/ui/main.c	Tue Dec 18 20:00:11 2012 +0000
+++ b/gui/ui/main.c	Wed Dec 19 13:58:06 2012 +0000
@@ -376,7 +376,7 @@
           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 );
            }
          }