]> git.sesse.net Git - vlc/commitdiff
qt4: don't update videoWidget size when in fullscreen
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 25 Aug 2009 06:42:14 +0000 (09:42 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 25 Aug 2009 06:42:14 +0000 (09:42 +0300)
should fix that returning from fullscreen going wrongsize, also set
fullscreen flags after reparent and before parenting back from
fullscreen.

modules/gui/qt4/components/interface_widgets.cpp

index 2aa9731d04101c0e6b57e5b3180761dc3d6f2f20..18a370136932f543f2d8317b897b0f43e6abcc6e 100644 (file)
@@ -175,6 +175,8 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
    Parent has to care about resizing itself */
 void VideoWidget::SetSizing( unsigned int w, unsigned int h )
 {
+    if (reparentable->windowState() & Qt::WindowFullScreen )
+        return;
     msg_Dbg( p_intf, "Video is resizing to: %i %i", w, h );
     videoSize.rwidth() = w;
     videoSize.rheight() = h;
@@ -215,8 +217,8 @@ void VideoWidget::SetFullScreen( bool b_fs )
 
         QRect screenres = QApplication::desktop()->screenGeometry( numscreen );
 
-        reparentable->setWindowState( newstate );
         reparentable->setParent( NULL );
+        reparentable->setWindowState( newstate );
         reparentable->setWindowFlags( newflags );
         /* To be sure window is on proper-screen in xinerama */
         if( !screenres.contains( reparentable->pos() ) )
@@ -229,8 +231,8 @@ void VideoWidget::SetFullScreen( bool b_fs )
     else
     {   /* Go windowed */
         reparentable->setWindowFlags( newflags );
-        layout->addWidget( reparentable );
         reparentable->setWindowState( newstate );
+        layout->addWidget( reparentable );
     }
     videoSync();
 }
@@ -247,6 +249,7 @@ void VideoWidget::release( void )
     hide();
 }
 
+
 QSize VideoWidget::sizeHint() const
 {
     return videoSize;