]> git.sesse.net Git - vlc/commitdiff
Qt: correct the size behaviour when zoom is called
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Mar 2010 16:34:31 +0000 (18:34 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Mar 2010 16:36:29 +0000 (18:36 +0200)
modules/gui/qt4/main_interface.cpp

index 953fd4bcf3ded8b4407dc57904eced2988184783..1b9c38cacdc623ffaef5438551516749d977dd7d 100644 (file)
@@ -587,8 +587,9 @@ void MainInterface::getVideoSlot( WId *p_id, int *pi_x, int *pi_y,
     *p_id = ret;
     if( ret ) /* The videoWidget is available */
     {
-        /* ask videoWidget to show */
-        videoWidget->SetSizing( *pi_width, *pi_height );
+        /* Ask videoWidget to resize correctly, if we are in normal mode */
+        if( !isFullScreen() && !isMaximized() )
+            videoWidget->SetSizing( *pi_width, *pi_height );
 
         /* Consider the video active now */
         showVideo();
@@ -621,6 +622,8 @@ int MainInterface::controlVideo( int i_query, va_list args )
     {
         unsigned int i_width  = va_arg( args, unsigned int );
         unsigned int i_height = va_arg( args, unsigned int );
+        if( isFullScreen() || isMaximized() )
+            showNormal();
         emit askVideoToResize( i_width, i_height );
         return VLC_SUCCESS;
     }