From: Ilkka Ollakka Date: Tue, 25 Aug 2009 06:42:14 +0000 (+0300) Subject: qt4: don't update videoWidget size when in fullscreen X-Git-Tag: 1.1.0-ff~3935 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c24b0a6f77f3a2674907b96860a852d767810bea;p=vlc 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. --- diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index 2aa9731d04..18a3701369 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;