[vlc-commits] Qt: toggling fullscreen by double click toggles everything

Benoit du Payrat git at videolan.org
Mon Apr 18 12:02:18 CEST 2016


vlc | branch: master | Benoit du Payrat <benoit at videolabs.io> | Wed Apr 13 15:03:40 2016 +0200| [27b241e4cb9c6257a1e68ed2ce034c2333f19d35] | committer: Jean-Baptiste Kempf

Qt: toggling fullscreen by double click toggles everything

Fix #14064

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27b241e4cb9c6257a1e68ed2ce034c2333f19d35
---

 modules/gui/qt/components/controller.cpp |    2 ++
 modules/gui/qt/components/controller.hpp |    1 +
 modules/gui/qt/input_manager.cpp         |    6 ++++++
 modules/gui/qt/input_manager.hpp         |    1 +
 4 files changed, 10 insertions(+)

diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp
index 4630140..dbb15a8 100644
--- a/modules/gui/qt/components/controller.cpp
+++ b/modules/gui/qt/components/controller.cpp
@@ -1180,6 +1180,7 @@ void FullscreenControllerWidget::setVoutList( vout_thread_t **pp_vout, int i_vou
         vout.append( p_vout );
         var_AddCallback( p_vout, "fullscreen",
                          FullscreenControllerWidgetFullscreenChanged, this );
+	CONNECT( this, fullscreenChanged( bool ), THEMIM, changeFullscreen( bool ) );
         /* I miss a add and fire */
         fullscreenChanged( p_vout, var_GetBool( p_vout, "fullscreen" ),
                            var_GetInteger( p_vout, "mouse-hide-timeout" ) );
@@ -1217,6 +1218,7 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
         IMEvent *eHide = new IMEvent( IMEvent::FullscreenControlHide, 0 );
         QApplication::postEvent( this, eHide );
     }
+    emit fullscreenChanged( b_fullscreen );
     vlc_mutex_unlock( &lock );
 }
 
diff --git a/modules/gui/qt/components/controller.hpp b/modules/gui/qt/components/controller.hpp
index f3fb18d..6ac5b14 100644
--- a/modules/gui/qt/components/controller.hpp
+++ b/modules/gui/qt/components/controller.hpp
@@ -260,6 +260,7 @@ public:
 
 signals:
     void keyPressed( QKeyEvent * );
+    void fullscreenChanged( bool );
 
 public slots:
     void setVoutList( vout_thread_t **, int );
diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
index da3d781..414f152 100644
--- a/modules/gui/qt/input_manager.cpp
+++ b/modules/gui/qt/input_manager.cpp
@@ -1261,3 +1261,9 @@ int MainInputManager::PLItemRemoved
     }
     return VLC_SUCCESS;
 }
+
+void MainInputManager::changeFullscreen( bool new_val )
+{
+    if ( var_GetBool( THEPL, "fullscreen" ) != new_val)
+	var_SetBool( THEPL, "fullscreen", new_val );
+}
diff --git a/modules/gui/qt/input_manager.hpp b/modules/gui/qt/input_manager.hpp
index c660cac..6956134 100644
--- a/modules/gui/qt/input_manager.hpp
+++ b/modules/gui/qt/input_manager.hpp
@@ -316,6 +316,7 @@ public slots:
     void activatePlayQuit( bool );
 
     void loopRepeatLoopStatus();
+    void changeFullscreen( bool );
 
 private slots:
     void notifyRandom( bool );



More information about the vlc-commits mailing list