Commit a7009554 authored by Laurent Aimar's avatar Laurent Aimar

Simplified/fixed qt4 fullscreen implementation.

 It removes the need of the reparentable widget (it is not needed
to reparent at all) and so simplify the code.
 It fixes win32 fullscreen support and improves win7 transitions.
 It avoids the need of an extra fullscreen widget, which is consistant
with the other media players I have tested.
parent c38f2e5f
...@@ -53,29 +53,11 @@ ...@@ -53,29 +53,11 @@
#ifdef Q_WS_X11 #ifdef Q_WS_X11
# include <X11/Xlib.h> # include <X11/Xlib.h>
# include <qx11info_x11.h> # include <qx11info_x11.h>
static void videoSync( void )
{
/* Make sure the X server has processed all requests.
* This protects other threads using distinct connections from getting
* the video widget window in an inconsistent states. */
XSync( QX11Info::display(), False );
}
#else
# define videoSync() (void)0
#endif #endif
#include <math.h> #include <math.h>
#include <assert.h> #include <assert.h>
class ReparentableWidget : public QWidget
{
private:
VideoWidget *owner;
public:
ReparentableWidget( VideoWidget *owner ) : owner( owner )
{}
};
/********************************************************************** /**********************************************************************
* Video Widget. A simple frame on which video is drawn * Video Widget. A simple frame on which video is drawn
* This class handles resize issues * This class handles resize issues
...@@ -84,7 +66,6 @@ public: ...@@ -84,7 +66,6 @@ public:
VideoWidget::VideoWidget( intf_thread_t *_p_i ) VideoWidget::VideoWidget( intf_thread_t *_p_i )
: QFrame( NULL ) : QFrame( NULL )
, p_intf( _p_i ) , p_intf( _p_i )
, reparentable( NULL )
{ {
/* Set the policy to expand in both directions */ /* Set the policy to expand in both directions */
// setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); // setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
...@@ -92,12 +73,23 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) ...@@ -92,12 +73,23 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i )
layout = new QHBoxLayout( this ); layout = new QHBoxLayout( this );
layout->setContentsMargins( 0, 0, 0, 0 ); layout->setContentsMargins( 0, 0, 0, 0 );
setLayout( layout ); setLayout( layout );
stable = NULL;
} }
VideoWidget::~VideoWidget() VideoWidget::~VideoWidget()
{ {
/* Ensure we are not leaking the video output. This would crash. */ /* Ensure we are not leaking the video output. This would crash. */
assert( reparentable == NULL ); assert( !stable );
}
void VideoWidget::sync( void )
{
#ifdef Q_WS_X11
/* Make sure the X server has processed all requests.
* This protects other threads using distinct connections from getting
* the video widget window in an inconsistent states. */
XSync( QX11Info::display(), False );
#endif
} }
/** /**
...@@ -109,7 +101,7 @@ WId VideoWidget::request( int *pi_x, int *pi_y, ...@@ -109,7 +101,7 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
{ {
msg_Dbg( p_intf, "Video was requested %i, %i", *pi_x, *pi_y ); msg_Dbg( p_intf, "Video was requested %i, %i", *pi_x, *pi_y );
if( reparentable != NULL ) if( stable )
{ {
msg_Dbg( p_intf, "embedded video already in use" ); msg_Dbg( p_intf, "embedded video already in use" );
return NULL; return NULL;
...@@ -120,20 +112,10 @@ WId VideoWidget::request( int *pi_x, int *pi_y, ...@@ -120,20 +112,10 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
*pi_height = size().height(); *pi_height = size().height();
} }
/* The Qt4 UI needs a fixed a widget ("this"), so that the parent layout is
* not messed up when we the video is reparented. Hence, we create an extra
* reparentable widget, that will be within the VideoWidget in windowed
* mode, and within the root window (NULL parent) in full-screen mode.
*/
reparentable = new ReparentableWidget( this );
reparentable->installEventFilter(this );
QLayout *innerLayout = new QHBoxLayout( reparentable );
innerLayout->setContentsMargins( 0, 0, 0, 0 );
/* The owner of the video window needs a stable handle (WinId). Reparenting /* The owner of the video window needs a stable handle (WinId). Reparenting
* in Qt4-X11 changes the WinId of the widget, so we need to create another * in Qt4-X11 changes the WinId of the widget, so we need to create another
* dummy widget that stays within the reparentable widget. */ * dummy widget that stays within the reparentable widget. */
QWidget *stable = new QWidget(); stable = new QWidget();
QPalette plt = palette(); QPalette plt = palette();
plt.setColor( QPalette::Window, Qt::black ); plt.setColor( QPalette::Window, Qt::black );
stable->setPalette( plt ); stable->setPalette( plt );
...@@ -147,9 +129,7 @@ WId VideoWidget::request( int *pi_x, int *pi_y, ...@@ -147,9 +129,7 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
stable->setAttribute( Qt::WA_PaintOnScreen, true ); stable->setAttribute( Qt::WA_PaintOnScreen, true );
#endif #endif
innerLayout->addWidget( stable ); layout->addWidget( stable );
layout->addWidget( reparentable );
#ifdef Q_WS_X11 #ifdef Q_WS_X11
/* HACK: Only one X11 client can subscribe to mouse button press events. /* HACK: Only one X11 client can subscribe to mouse button press events.
...@@ -163,7 +143,7 @@ WId VideoWidget::request( int *pi_x, int *pi_y, ...@@ -163,7 +143,7 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
attr.your_event_mask &= ~(ButtonPressMask|ButtonReleaseMask); attr.your_event_mask &= ~(ButtonPressMask|ButtonReleaseMask);
XSelectInput( dpy, w, attr.your_event_mask ); XSelectInput( dpy, w, attr.your_event_mask );
#endif #endif
videoSync(); sync();
#ifndef NDEBUG #ifndef NDEBUG
msg_Dbg( p_intf, "embedded video ready (handle %p)", msg_Dbg( p_intf, "embedded video ready (handle %p)",
(void *)stable->winId() ); (void *)stable->winId() );
...@@ -176,8 +156,6 @@ WId VideoWidget::request( int *pi_x, int *pi_y, ...@@ -176,8 +156,6 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
Parent has to care about resizing itself */ Parent has to care about resizing itself */
void VideoWidget::SetSizing( unsigned int w, unsigned int h ) void VideoWidget::SetSizing( unsigned int w, unsigned int h )
{ {
if (reparentable->windowState() & Qt::WindowFullScreen )
return;
if( !isVisible() ) show(); if( !isVisible() ) show();
resize( w, h ); resize( w, h );
emit sizeChanged( w, h ); emit sizeChanged( w, h );
...@@ -188,105 +166,22 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h ) ...@@ -188,105 +166,22 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
*/ */
if( size().width() == w && size().height() == h ) if( size().width() == w && size().height() == h )
updateGeometry(); updateGeometry();
videoSync(); sync();
}
void VideoWidget::SetFullScreen( bool b_fs, bool b_ontop )
{
const Qt::WindowStates curstate = reparentable->windowState();
Qt::WindowStates newstate = curstate;
Qt::WindowFlags newflags = reparentable->windowFlags();
if( b_fs )
{
newstate |= Qt::WindowFullScreen;
if( b_ontop )
newflags |= Qt::WindowStaysOnTopHint;
}
else
{
newstate &= ~Qt::WindowFullScreen;
newflags &= ~Qt::WindowStaysOnTopHint;
}
if( newstate == curstate )
return; /* no changes needed */
if( b_fs )
{ /* Go full-screen */
int numscreen = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" );
/* if user hasn't defined screennumber, or screennumber that is bigger
* than current number of screens, take screennumber where current interface
* is
*/
if( numscreen == -1 || numscreen > QApplication::desktop()->numScreens() )
numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
QRect screenres = QApplication::desktop()->screenGeometry( numscreen );
/* To be sure window is on proper-screen in xinerama */
if( !screenres.contains( reparentable->pos() ) )
{
msg_Dbg( p_intf, "Moving video to correct screen");
reparentable->move( QPoint( screenres.x(), screenres.y() ) );
}
reparentable->setParent( NULL, newflags );
reparentable->setWindowState( newstate );
/* FIXME: inherit from the vout window, not the interface */
char *title = var_InheritString( p_intf, "video-title" );
reparentable->setWindowTitle( qfu(title ? title : _("Video")) );
free( title );
reparentable->show();
reparentable->activateWindow();
reparentable->raise();
}
else
{ /* Go windowed */
reparentable->setWindowFlags( newflags );
reparentable->setWindowState( newstate );
layout->addWidget( reparentable );
}
videoSync();
} }
void VideoWidget::release( void ) void VideoWidget::release( void )
{ {
msg_Dbg( p_intf, "Video is not needed anymore" ); msg_Dbg( p_intf, "Video is not needed anymore" );
//layout->removeWidget( reparentable );
reparentable->deleteLater(); assert( stable );
reparentable = NULL; layout->removeWidget( stable );
stable->deleteLater();
stable = NULL;
updateGeometry(); updateGeometry();
hide(); hide();
} }
#undef KeyPress
bool VideoWidget::eventFilter(QObject *obj, QEvent *event)
{
if( obj == reparentable )
{
if (event->type() == QEvent::Close)
{
THEDP->quit();
return true;
}
else if( event->type() == QEvent::KeyPress )
{
emit keyPressed( static_cast<QKeyEvent *>(event) );
return true;
}
else if( event->type() == QEvent::Wheel )
{
int i_vlckey = qtWheelEventToVLCKey( static_cast<QWheelEvent *>(event) );
var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlckey );
return true;
}
}
return false;
}
/********************************************************************** /**********************************************************************
* Background Widget. Show a simple image background. Currently, * Background Widget. Show a simple image background. Currently,
* it's album art if present or cone. * it's album art if present or cone.
......
...@@ -46,14 +46,11 @@ class QPixmap; ...@@ -46,14 +46,11 @@ class QPixmap;
class QHBoxLayout; class QHBoxLayout;
class QMenu; class QMenu;
class QSlider; class QSlider;
class ReparentableWidget;
/******************** Video Widget ****************/ /******************** Video Widget ****************/
class VideoWidget : public QFrame class VideoWidget : public QFrame
{ {
Q_OBJECT Q_OBJECT
friend class ReparentableWidget;
public: public:
VideoWidget( intf_thread_t * ); VideoWidget( intf_thread_t * );
virtual ~VideoWidget(); virtual ~VideoWidget();
...@@ -61,7 +58,7 @@ public: ...@@ -61,7 +58,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 ); void sync( void );
protected: protected:
virtual QPaintEngine *paintEngine() const virtual QPaintEngine *paintEngine() const
...@@ -72,11 +69,9 @@ protected: ...@@ -72,11 +69,9 @@ protected:
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
QWidget *reparentable; QWidget *stable;
QLayout *layout; QLayout *layout;
virtual bool eventFilter ( QObject * watched, QEvent * event );
signals: signals:
void keyPressed( QKeyEvent * );
void sizeChanged( int, int ); void sizeChanged( int, int );
public slots: public slots:
......
...@@ -110,7 +110,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -110,7 +110,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
b_autoresize = var_InheritBool( p_intf, "qt-video-autoresize" ); b_autoresize = var_InheritBool( p_intf, "qt-video-autoresize" );
/* Are we in the enhanced always-video mode or not ? */ /* Are we in the enhanced always-video mode or not ? */
i_visualmode = var_InheritBool( p_intf, "qt-minimal-view" ); b_minimalView = var_InheritBool( p_intf, "qt-minimal-view" );
/* Do we want anoying popups or not */ /* Do we want anoying popups or not */
b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" ); b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" );
...@@ -219,8 +219,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -219,8 +219,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
} }
CONNECT( this, askVideoSetFullScreen( bool ), CONNECT( this, askVideoSetFullScreen( bool ),
this, setVideoFullScreen( bool ) ); this, setVideoFullScreen( bool ) );
CONNECT( videoWidget, keyPressed( QKeyEvent * ),
this, handleKeyPress( QKeyEvent * ) );
} }
CONNECT( THEDP, toolBarConfUpdated(), this, recreateToolbars() ); CONNECT( THEDP, toolBarConfUpdated(), this, recreateToolbars() );
...@@ -246,6 +244,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -246,6 +244,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
QVLCTools::restoreWidgetPosition( settings, this, QSize(400, 100) ); QVLCTools::restoreWidgetPosition( settings, this, QSize(400, 100) );
settings->endGroup(); settings->endGroup();
b_interfaceFullScreen = isFullScreen();
/* Final sizing and showing */ /* Final sizing and showing */
setVisible( !b_hideAfterCreation ); setVisible( !b_hideAfterCreation );
...@@ -253,7 +253,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -253,7 +253,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
menuBar()->sizeHint().width() ) + 30 ); menuBar()->sizeHint().width() ) + 30 );
/* Switch to minimal view if needed, must be called after the show() */ /* Switch to minimal view if needed, must be called after the show() */
if( i_visualmode ) if( b_minimalView )
toggleMinimalView( true ); toggleMinimalView( true );
} }
...@@ -583,6 +583,7 @@ void MainInterface::releaseVideoSlot( void ) ...@@ -583,6 +583,7 @@ void MainInterface::releaseVideoSlot( void )
{ {
videoWidget->release(); videoWidget->release();
setVideoOnTop( false ); setVideoOnTop( false );
setVideoFullScreen( false );
if( stackCentralW->currentWidget() == videoWidget ) if( stackCentralW->currentWidget() == videoWidget )
restoreStackOldWidget(); restoreStackOldWidget();
...@@ -593,17 +594,42 @@ void MainInterface::releaseVideoSlot( void ) ...@@ -593,17 +594,42 @@ void MainInterface::releaseVideoSlot( void )
void MainInterface::setVideoSize( unsigned int w, unsigned int h ) void MainInterface::setVideoSize( unsigned int w, unsigned int h )
{ {
if( isFullScreen() || isMaximized() ) if( !isFullScreen() && !isMaximized() )
showNormal();
videoWidget->SetSizing( w, h ); videoWidget->SetSizing( w, h );
} }
void MainInterface::setVideoFullScreen( bool fs ) void MainInterface::setVideoFullScreen( bool fs )
{ {
b_videoFullScreen = fs; b_videoFullScreen = fs;
/* refresh main interface on-top status if needed */ if( fs )
setVideoOnTop( b_videoOnTop ); {
videoWidget->SetFullScreen( fs, b_videoOnTop ); int numscreen = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" );
/* if user hasn't defined screennumber, or screennumber that is bigger
* than current number of screens, take screennumber where current interface
* is
*/
if( numscreen == -1 || numscreen > QApplication::desktop()->numScreens() )
numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
QRect screenres = QApplication::desktop()->screenGeometry( numscreen );
/* To be sure window is on proper-screen in xinerama */
if( !screenres.contains( pos() ) )
{
msg_Dbg( p_intf, "Moving video to correct screen");
move( QPoint( screenres.x(), screenres.y() ) );
}
setMinimalView( true );
setInterfaceFullScreen( true );
}
else
{
/* TODO do we want to restore screen and position ? (when
* qt-fullscreen-screennumber is forced) */
setMinimalView( b_minimalView );
setInterfaceFullScreen( b_interfaceFullScreen );
}
videoWidget->sync();
} }
/* Slot to change the video always-on-top flag. /* Slot to change the video always-on-top flag.
...@@ -611,14 +637,10 @@ void MainInterface::setVideoFullScreen( bool fs ) ...@@ -611,14 +637,10 @@ void MainInterface::setVideoFullScreen( bool fs )
void MainInterface::setVideoOnTop( bool on_top ) void MainInterface::setVideoOnTop( bool on_top )
{ {
b_videoOnTop = on_top; b_videoOnTop = on_top;
/* The main interface is not always-on-top if it does not contain
* the video (which is to say in fullscreen mode). */
if( b_videoFullScreen )
on_top = false;
Qt::WindowFlags oldflags = windowFlags(), newflags; Qt::WindowFlags oldflags = windowFlags(), newflags;
if( on_top ) if( b_videoOnTop )
newflags = oldflags | Qt::WindowStaysOnTopHint; newflags = oldflags | Qt::WindowStaysOnTopHint;
else else
newflags = oldflags & ~Qt::WindowStaysOnTopHint; newflags = oldflags & ~Qt::WindowStaysOnTopHint;
...@@ -754,12 +776,20 @@ void MainInterface::dockPlaylist( bool p_docked ) ...@@ -754,12 +776,20 @@ void MainInterface::dockPlaylist( bool p_docked )
playlistVisible = true; playlistVisible = true;
} }
void MainInterface::setMinimalView( bool b_minimal )
{
menuBar()->setVisible( !b_minimal );
controls->setVisible( !b_minimal );
statusBar()->setVisible( !b_minimal );
inputC->setVisible( !b_minimal );
}
/* /*
If b_switch is false, then we are normalView If b_minimal is false, then we are normalView
*/ */
void MainInterface::toggleMinimalView( bool b_switch ) void MainInterface::toggleMinimalView( bool b_minimal )
{ {
if( i_visualmode == 0 && b_autoresize ) /* Normal mode */ if( !b_minimalView && b_autoresize ) /* Normal mode */
{ {
if( stackCentralW->currentWidget() == bgWidget ) if( stackCentralW->currentWidget() == bgWidget )
{ {
...@@ -769,13 +799,11 @@ void MainInterface::toggleMinimalView( bool b_switch ) ...@@ -769,13 +799,11 @@ void MainInterface::toggleMinimalView( bool b_switch )
} }
} }
} }
b_minimalView = b_minimal;
if( !b_videoFullScreen )
setMinimalView( b_minimalView );
menuBar()->setVisible( !b_switch ); emit minimalViewToggled( b_minimalView );
controls->setVisible( !b_switch );
statusBar()->setVisible( !b_switch );
inputC->setVisible( !b_switch );
emit minimalViewToggled( b_switch );
} }
/* toggling advanced controls buttons */ /* toggling advanced controls buttons */
...@@ -1070,10 +1098,9 @@ void MainInterface::keyPressEvent( QKeyEvent *e ) ...@@ -1070,10 +1098,9 @@ void MainInterface::keyPressEvent( QKeyEvent *e )
void MainInterface::handleKeyPress( QKeyEvent *e ) void MainInterface::handleKeyPress( QKeyEvent *e )
{ {
if( ( e->modifiers() & Qt::ControlModifier ) && ( e->key() == Qt::Key_H ) if( ( e->modifiers() & Qt::ControlModifier ) && ( e->key() == Qt::Key_H ) )
&& !menuBar()->isVisible() )
{ {
toggleMinimalView( false ); toggleMinimalView( !b_minimalView );
e->accept(); e->accept();
} }
...@@ -1101,18 +1128,19 @@ void MainInterface::closeEvent( QCloseEvent *e ) ...@@ -1101,18 +1128,19 @@ void MainInterface::closeEvent( QCloseEvent *e )
THEDP->quit(); THEDP->quit();
} }
void MainInterface::toggleFullScreen() void MainInterface::setInterfaceFullScreen( bool fs )
{ {
if( isFullScreen() ) if( fs )
{
showNormal();
emit fullscreenInterfaceToggled( false );
}
else
{
showFullScreen(); showFullScreen();
emit fullscreenInterfaceToggled( true ); else
} showNormal();
}
void MainInterface::toggleInterfaceFullScreen()
{
b_interfaceFullScreen = !b_interfaceFullScreen;
if( !b_videoFullScreen )
setInterfaceFullScreen( b_interfaceFullScreen );
emit fullscreenInterfaceToggled( b_interfaceFullScreen );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -86,6 +86,7 @@ public: ...@@ -86,6 +86,7 @@ public:
#endif #endif
int getControlsVisibilityStatus(); int getControlsVisibilityStatus();
bool isPlDocked() { return ( b_plDocked != false ); } bool isPlDocked() { return ( b_plDocked != false ); }
bool isInterfaceFullScreen() { return b_interfaceFullScreen; }
protected: protected:
void dropEventPlay( QDropEvent *, bool); void dropEventPlay( QDropEvent *, bool);
...@@ -116,6 +117,10 @@ private: ...@@ -116,6 +117,10 @@ private:
void showVideo(); void showVideo();
void restoreStackOldWidget(); void restoreStackOldWidget();
/* */
void setMinimalView( bool );
void setInterfaceFullScreen( bool );
/* */ /* */
QSettings *settings; QSettings *settings;
#ifndef HAVE_MAEMO #ifndef HAVE_MAEMO
...@@ -153,7 +158,8 @@ private: ...@@ -153,7 +158,8 @@ private:
bool b_videoFullScreen; ///< --fullscreen bool b_videoFullScreen; ///< --fullscreen
bool b_videoOnTop; ///< --video-on-top bool b_videoOnTop; ///< --video-on-top
bool b_hideAfterCreation; bool b_hideAfterCreation;
int i_visualmode; ///< Visual Mode bool b_minimalView; ///< Minimal video
bool b_interfaceFullScreen;
/* States */ /* States */
bool playlistVisible; ///< Is the playlist visible ? bool playlistVisible; ///< Is the playlist visible ?
...@@ -177,7 +183,7 @@ public slots: ...@@ -177,7 +183,7 @@ public slots:
void toggleUpdateSystrayMenu(); void toggleUpdateSystrayMenu();
#endif #endif
void toggleAdvancedButtons(); void toggleAdvancedButtons();
void toggleFullScreen(); void toggleInterfaceFullScreen();
void toggleFSC(); void toggleFSC();
void popupMenu( const QPoint& ); void popupMenu( const QPoint& );
...@@ -210,7 +216,7 @@ private slots: ...@@ -210,7 +216,7 @@ private slots:
void resizeStack( int w, int h ) { void resizeStack( int w, int h ) {
if( !isFullScreen() && !isMaximized() ) if( !isFullScreen() && !isMaximized() )
if( i_visualmode == 1 ) resize( w, h ); /* Oh yes, it shouldn't if( b_minimalView ) resize( w, h ); /* Oh yes, it shouldn't
be possible that size() - stackCentralW->size() < 0 be possible that size() - stackCentralW->size() < 0
since stackCentralW is contained in the QMW... */ since stackCentralW is contained in the QMW... */
else resize( size() - stackCentralW->size() + QSize( w, h ) ); else resize( size() - stackCentralW->size() + QSize( w, h ) );
......
...@@ -465,9 +465,9 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface ...@@ -465,9 +465,9 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface
/* FullScreen View */ /* FullScreen View */
action = menu->addAction( qtr( "&Fullscreen Interface" ), mi, action = menu->addAction( qtr( "&Fullscreen Interface" ), mi,
SLOT( toggleFullScreen() ), QString( "F11" ) ); SLOT( toggleInterfaceFullScreen() ), QString( "F11" ) );
action->setCheckable( true ); action->setCheckable( true );
action->setChecked( mi->isFullScreen() ); action->setChecked( mi->isInterfaceFullScreen() );
CONNECT( mi, fullscreenInterfaceToggled( bool ), CONNECT( mi, fullscreenInterfaceToggled( bool ),
action, setChecked( bool ) ); action, setChecked( bool ) );
......
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