Commit c24b0a6f authored by Ilkka Ollakka's avatar 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.
parent a75b65e7
...@@ -175,6 +175,8 @@ WId VideoWidget::request( int *pi_x, int *pi_y, ...@@ -175,6 +175,8 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
Parent has to care about resizing itself */ Parent has to care about resizing itself */
void VideoWidget::SetSizing( unsigned int w, unsigned int h ) 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 ); msg_Dbg( p_intf, "Video is resizing to: %i %i", w, h );
videoSize.rwidth() = w; videoSize.rwidth() = w;
videoSize.rheight() = h; videoSize.rheight() = h;
...@@ -215,8 +217,8 @@ void VideoWidget::SetFullScreen( bool b_fs ) ...@@ -215,8 +217,8 @@ void VideoWidget::SetFullScreen( bool b_fs )
QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); QRect screenres = QApplication::desktop()->screenGeometry( numscreen );
reparentable->setWindowState( newstate );
reparentable->setParent( NULL ); reparentable->setParent( NULL );
reparentable->setWindowState( newstate );
reparentable->setWindowFlags( newflags ); reparentable->setWindowFlags( newflags );
/* To be sure window is on proper-screen in xinerama */ /* To be sure window is on proper-screen in xinerama */
if( !screenres.contains( reparentable->pos() ) ) if( !screenres.contains( reparentable->pos() ) )
...@@ -229,8 +231,8 @@ void VideoWidget::SetFullScreen( bool b_fs ) ...@@ -229,8 +231,8 @@ void VideoWidget::SetFullScreen( bool b_fs )
else else
{ /* Go windowed */ { /* Go windowed */
reparentable->setWindowFlags( newflags ); reparentable->setWindowFlags( newflags );
layout->addWidget( reparentable );
reparentable->setWindowState( newstate ); reparentable->setWindowState( newstate );
layout->addWidget( reparentable );
} }
videoSync(); videoSync();
} }
...@@ -247,6 +249,7 @@ void VideoWidget::release( void ) ...@@ -247,6 +249,7 @@ void VideoWidget::release( void )
hide(); hide();
} }
QSize VideoWidget::sizeHint() const QSize VideoWidget::sizeHint() const
{ {
return videoSize; return videoSize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment