Mercurial > mplayer.hg
changeset 33947:3867c67b35a3
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.
author | ib |
---|---|
date | Thu, 01 Sep 2011 17:27:44 +0000 |
parents | 8d7f3f0b7343 |
children | 8a76f05418f9 |
files | gui/ui/main.c |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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;