Commit 312d9c3f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Qt4: do not set fullscreen window on top (fixes #3712)

Normally, the window will go on top of the stack of normal windows
anyway. If not, we may need to force this, which is different from
always-on-top in any case.

Known issue: toggling video on top while in fullscreen is not
implemented yet.
parent 09b6b8e3
......@@ -187,7 +187,7 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
videoSync();
}
void VideoWidget::SetFullScreen( bool b_fs )
void VideoWidget::SetFullScreen( bool b_fs, bool b_ontop )
{
const Qt::WindowStates curstate = reparentable->windowState();
Qt::WindowStates newstate = curstate;
......@@ -197,7 +197,8 @@ void VideoWidget::SetFullScreen( bool b_fs )
if( b_fs )
{
newstate |= Qt::WindowFullScreen;
newflags |= Qt::WindowStaysOnTopHint;
if( b_ontop )
newflags |= Qt::WindowStaysOnTopHint;
}
else
{
......
......@@ -61,6 +61,7 @@ public:
WId request( int *, int *, unsigned int *, unsigned int *, bool );
void release( void );
int control( void *, int, va_list );
void SetFullScreen( bool, bool );
protected:
virtual QPaintEngine *paintEngine() const
......@@ -80,7 +81,6 @@ signals:
public slots:
void SetSizing( unsigned int, unsigned int );
void SetFullScreen( bool );
};
/******************** Background Widget ****************/
......
......@@ -603,7 +603,7 @@ void MainInterface::setVideoFullScreen( bool fs )
b_videoFullScreen = fs;
/* refresh main interface on-top status if needed */
setVideoOnTop( b_videoOnTop );
videoWidget->SetFullScreen( fs );
videoWidget->SetFullScreen( fs, b_videoOnTop );
}
/* Slot to change the video always-on-top flag.
......
Supports Markdown
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