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

Benoit du Payrat git at videolan.org
Mon Apr 18 13:10:46 CEST 2016


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

Qt: toggling fullscreen by double click toggles everything

Fix #14064

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 27b241e4cb9c6257a1e68ed2ce034c2333f19d35)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 7ea4939..d93e0db 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -1172,6 +1172,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" ) );
@@ -1209,6 +1210,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/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index b22e430..2a65e19 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -268,6 +268,7 @@ public:
 
 signals:
     void keyPressed( QKeyEvent * );
+    void fullscreenChanged( bool );
 
 public slots:
     void setVoutList( vout_thread_t **, int );
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 0a65b6d..fd45f4a 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -1320,3 +1320,9 @@ static int 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/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index d9edcb6..7d3b76a 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -308,6 +308,7 @@ public slots:
     void activatePlayQuit( bool );
 
     void loopRepeatLoopStatus();
+    void changeFullscreen( bool );
 
 private slots:
     void notifyRandom( bool );



More information about the vlc-commits mailing list