[vlc-devel] [PATCH] fix for fullscreen issue under xfce
Lars Mueller
cobinja at yahoo.de
Mon May 7 22:15:08 CEST 2012
---
modules/gui/qt4/main_interface.cpp | 12 ++++++++++--
modules/gui/qt4/main_interface.hpp | 1 +
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp
b/modules/gui/qt4/main_interface.cpp
index db3a12d..0b34647 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -252,6 +252,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf
) : QVLCMW( _p_intf )
/* Switch to minimal view if needed, must be called after the
show() */
if( b_minimalView )
toggleMinimalView( true );
+ + stateBeforeFullScreen = windowState();
}
MainInterface::~MainInterface()
@@ -1336,9 +1338,15 @@ void MainInterface::closeEvent( QCloseEvent *e )
void MainInterface::setInterfaceFullScreen( bool fs )
{
if( fs )
- setWindowState( windowState() | Qt::WindowFullScreen );
+ {
+ stateBeforeFullScreen = windowState();
+ showFullScreen();
+ }
else
- setWindowState( windowState() & ~Qt::WindowFullScreen );
+ {
+ showNormal(); /* maximizing directly from fullscreen doesn't
necessarily work with all X11 window managers */
+ setWindowState(stateBeforeFullScreen);
+ }
}
void MainInterface::toggleInterfaceFullScreen()
{
diff --git a/modules/gui/qt4/main_interface.hpp
b/modules/gui/qt4/main_interface.hpp
index c81d8b5..505e4e4 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -169,6 +169,7 @@ private:
bool b_hasPausedWhenMinimized;
bool b_statusbarVisible;
+ Qt::WindowStates stateBeforeFullScreen; ///< The window state
before switching to fullscreen
#ifdef WIN32
HIMAGELIST himl;
--
1.7.9.5
More information about the vlc-devel
mailing list