[vlc-devel] commit: Forced "on top" to the video widget in Qt4 while in fullscreen. ( Laurent Aimar )
git version control
git at videolan.org
Wed Aug 12 23:20:40 CEST 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Aug 12 22:12:42 2009 +0200| [644a03b1f2e701f38adec587b71638da0ef80107] | committer: Laurent Aimar
Forced "on top" to the video widget in Qt4 while in fullscreen.
There is still a problem when the Gui itself has "on top" set.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=644a03b1f2e701f38adec587b71638da0ef80107
---
modules/gui/qt4/components/interface_widgets.cpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 3c676aa..cf923d4 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -158,11 +158,18 @@ void VideoWidget::SetFullScreen( bool b_fs )
{
const Qt::WindowStates curstate = reparentable->windowState();
Qt::WindowStates newstate = curstate;
+ Qt::WindowFlags newflags = reparentable->windowFlags();
if( b_fs )
+ {
newstate |= Qt::WindowFullScreen;
+ newflags |= Qt::WindowStaysOnTopHint;
+ }
else
+ {
newstate &= ~Qt::WindowFullScreen;
+ newflags &= ~Qt::WindowStaysOnTopHint;
+ }
if( newstate == curstate )
return; /* no changes needed */
@@ -170,10 +177,12 @@ void VideoWidget::SetFullScreen( bool b_fs )
{ /* Go full-screen */
reparentable->setWindowState( newstate );
reparentable->setParent( NULL );
+ reparentable->setWindowFlags( newflags );
reparentable->show();
}
else
{ /* Go windowed */
+ reparentable->setWindowFlags( newflags );
layout->addWidget( reparentable );
reparentable->setWindowState( newstate );
}
More information about the vlc-devel
mailing list