[vlc-devel] commit: Qt: Fullscreen Controller, show with full opacity when mouseChanged . (Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Jun 14 20:36:38 CEST 2009


vlc | branch: 1.0-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jun 14 15:03:19 2009 +0200| [3af6e8070c48219218dbbe770c2ae4f318967daf] | committer: Jean-Baptiste Kempf 

Qt: Fullscreen Controller, show with full opacity when mouseChanged.
(cherry picked from commit f52b2b2da08a74b5bdbaf1f8b7f460c46ad9c177)

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

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

 modules/gui/qt4/components/controller.cpp |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 778ceaa..04595ce 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -757,13 +757,14 @@ void FullscreenControllerWidget::showFSC()
         screenRes != QApplication::desktop()->screenGeometry(number) )
     {
         centerFSC( number );
+        msg_Dbg( p_intf, "Recentering the Fullscreen Controller" );
     }
 
-    show();
-
 #if HAVE_TRANSPARENCY
     setWindowOpacity( DEFAULT_OPACITY );
 #endif
+
+    show();
 }
 
 /**
@@ -836,10 +837,12 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
 
     switch( event->type() )
     {
+        /* This is used when the 'i' hotkey is used, to force quick toggle */
         case FullscreenControlToggle_Type:
             vlc_mutex_lock( &lock );
             b_fs = b_fullscreen;
             vlc_mutex_unlock( &lock );
+
             if( b_fs )
             {
                 if( isHidden() )
@@ -851,21 +854,25 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
                     hideFSC();
             }
             break;
+        /* Event called to Show the FSC on mouseChanged() */
         case FullscreenControlShow_Type:
             vlc_mutex_lock( &lock );
             b_fs = b_fullscreen;
             vlc_mutex_unlock( &lock );
 
-            if( b_fs && !isVisible() )
+            if( b_fs )
                 showFSC();
+
             break;
-        case FullscreenControlHide_Type:
-            hideFSC();
-            break;
+        /* Start the timer to hide later, called usually with above case */
         case FullscreenControlPlanHide_Type:
             if( !b_mouse_over ) // Only if the mouse is not over FSC
                 planHideFSC();
             break;
+        /* Hide */
+        case FullscreenControlHide_Type:
+            hideFSC();
+            break;
         default:
             break;
     }




More information about the vlc-devel mailing list