[vlc-devel] Regarding VLC + Xfce Fullscreen

Jogy Antony simula67 at gmail.com
Thu Feb 28 14:40:00 CET 2013


Hi Everyone

Apologize in advance for the long mail. I am fairly inexperienced in
open source development.

My problem is that when VLC goes from Maximized to Fullscreen mode in
Xfce the panel is still shown.

QT stores the windowstate as a bitmap, maximized and fullscreen being
the important windowstates. VLC attempts to go fullscreen like this :

setWindowState( windowState() | Qt::WindowFullScreen );

This is unfortunate, since if the windowState was already maximized,
this will set it maxmized _and_ fullscreen.
This will not break fullscreen per se, but some subsequent UI
manipulations may confuse QT
( https://bugreports.qt-project.org/browse/QTBUG-25707 and
https://bugzilla.xfce.org/show_bug.cgi?id=8563 )

Qt has introduced a better way to go fullscreen, using the
showFullScreen() method.
qt/src/gui/kernel/qwidget.cpp:
 3119 void QWidget::showFullScreen()
 3120 {
 ...
 3136     setWindowState((windowState() & ~(Qt::WindowMinimized |
Qt::WindowMaximized))
 3137                    | Qt::WindowFullScreen);


It unsets the Qt::WindowMaxmimized and Qt::WindowMinimized bits! The
problem here is that it has forgotten the previous windowstate.

So, the solution to this would be for QT to backup the old windowstate
inside showFullScreen and restore it during showNormal
Then, VLC should use these instead of the current setWindowState calls.

Barring that, we can backup the  windowstate and make the showNormal
and showFullScreen calls. Seems like a patch was already submitted to
do exactly this :
http://mailman.videolan.org/pipermail/vlc-devel/2012-May/088360.html

What should I do now ?

Thanks & Regards
Joji Antony



More information about the vlc-devel mailing list