[vlc-devel] commit: qt4: Fix hotkey i for FS controller (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Aug 22 18:49:51 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Aug 22 09:52:40 2008 -0700| [76dfb93e23d6de465fb616cbdf22b17daf318ef7] | committer: Jean-Baptiste Kempf 

qt4: Fix hotkey i for FS controller

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

Conflicts:

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

 modules/gui/qt4/components/interface_widgets.cpp |   61 +++++++++++++---------
 modules/gui/qt4/components/interface_widgets.hpp |    2 +-
 2 files changed, 38 insertions(+), 25 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 94ac612..51c26f6 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -1007,7 +1007,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i,
 
 #ifdef WIN32TRICK
     setWindowOpacity( 0.0 );
-    fscHidden = true;
+    b_fscHidden = true;
     adjustSize();
     show();
 #endif
@@ -1032,9 +1032,9 @@ void FullscreenControllerWidget::showFSC()
     if( isHidden() )
         show();
 
-    if( fscHidden )
+    if( b_fscHidden )
     {
-        fscHidden = false;
+        b_fscHidden = false;
         setWindowOpacity( 1.0 );
     }
 #else
@@ -1054,7 +1054,7 @@ void FullscreenControllerWidget::showFSC()
 void FullscreenControllerWidget::hideFSC()
 {
 #ifdef WIN32TRICK
-    fscHidden = true;
+    b_fscHidden = true;
     setWindowOpacity( 0.0 );    // simulate hidding
 #else
     hide();
@@ -1099,7 +1099,7 @@ void FullscreenControllerWidget::slowHideFSC()
     else
     {
 #ifdef WIN32TRICK
-         if ( windowOpacity() > 0.0 && !fscHidden )
+         if ( windowOpacity() > 0.0 && !b_fscHidden )
 #else
          if ( windowOpacity() > 0.0 )
 #endif
@@ -1125,25 +1125,38 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
 
     switch( event->type() )
     {
-    case FullscreenControlToggle_Type:
-         // FIXME 
-         TOGGLEV( this );
-         break;
-    case FullscreenControlShow_Type:
-        vlc_mutex_lock( &lock );
-        b_fs = b_fullscreen;
-        vlc_mutex_unlock( &lock );
-
-        if( b_fs )  // FIXME I am not sure about that one
-            showFSC();
-        break;
-    case FullscreenControlHide_Type:
-        hideFSC();
-        break;
-    case FullscreenControlPlanHide_Type:
-        if( !b_mouse_over ) // Only if the mouse is not over FSC
-            planHideFSC();
-        break;
+        case FullscreenControlToggle_Type:
+            vlc_mutex_lock( &lock );
+            b_fs = b_fullscreen;
+            vlc_mutex_unlock( &lock );
+            if( b_fs )
+#if WIN32TRICK
+                if( b_fscHidden )
+#else
+                if( isHidden() )
+#endif
+                {
+                    p_hideTimer->stop();
+                    showFSC();
+                }
+                else
+                    hideFSC();
+            break;
+        case FullscreenControlShow_Type:
+            vlc_mutex_lock( &lock );
+            b_fs = b_fullscreen;
+            vlc_mutex_unlock( &lock );
+
+            if( b_fs )  // FIXME I am not sure about that one
+                showFSC();
+            break;
+        case FullscreenControlHide_Type:
+            hideFSC();
+            break;
+        case FullscreenControlPlanHide_Type:
+            if( !b_mouse_over ) // Only if the mouse is not over FSC
+                planHideFSC();
+            break;
     }
 }
 
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index 098bcbc..cbb16fb 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -288,7 +288,7 @@ private:
     int  i_slow_hide_timeout;
 
 #ifdef WIN32TRICK
-    bool fscHidden;
+    bool b_fscHidden;
 #endif
 
     virtual void customEvent( QEvent *event );




More information about the vlc-devel mailing list