[vlc-devel] commit: qt4: don't update videoWidget size when in fullscreen ( Ilkka Ollakka )

git version control git at videolan.org
Tue Aug 25 08:43:35 CEST 2009


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Aug 25 09:42:14 2009 +0300| [c24b0a6f77f3a2674907b96860a852d767810bea] | committer: Ilkka Ollakka 

qt4: don't update videoWidget size when in fullscreen

should fix that returning from fullscreen going wrongsize, also set
fullscreen flags after reparent and before parenting back from
fullscreen.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c24b0a6f77f3a2674907b96860a852d767810bea
---

 modules/gui/qt4/components/interface_widgets.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 2aa9731..18a3701 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -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;




More information about the vlc-devel mailing list