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

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