[vlc-devel] [PATCH] fix for fullscreen issue under xfce
Rémi Denis-Courmont
remi at remlab.net
Mon May 7 22:40:11 CEST 2012
Hello,
Le lundi 7 mai 2012 23:15:08 Lars Mueller, vous avez écrit :
> ---
> 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();
The patch is syntactically corrupt.
> }
> 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 */
An X11 client can only add or remove one EWMH state per message.
'setWindowState(windowState() & ~Qt::WindowFullScreen)' removes
the fullscreen state (NET_WM_STATE_FULSCREEN).
Your patch both will first remove maximized in both dimensions, then remove
fullscreen, then add maximized in both dimensions again. That is not only
inefficient; that will cause unwarranted display glitches. I just checked with
xtrace: VLC and Qt4 (4.8.1) seem to do the right thing: only the fullscreen
state is toggled.
To me, either your window manager or your Qt4 version has a bug.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list