# HG changeset patch # User ib # Date 1314898064 0 # Node ID 3867c67b35a3b0065c75de0d8b62cb4fd988f097 # Parent 8d7f3f0b73437d89249443b5f619c0054f00e8f0 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. diff -r 8d7f3f0b7343 -r 3867c67b35a3 gui/ui/main.c --- a/gui/ui/main.c Thu Sep 01 17:16:49 2011 +0000 +++ b/gui/ui/main.c Thu Sep 01 17:27:44 2011 +0000 @@ -331,8 +331,7 @@ } break; case evHalfSize: - btnSet( evFullScreen,btnReleased ); - if ( guiInfo.Playing ) + if ( guiInfo.VideoWindow && guiInfo.Playing ) { if ( guiApp.subWindow.isFullScreen ) { @@ -342,11 +341,11 @@ 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 @@ 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 @@ 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;