Commit f52b2b2d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Fullscreen Controller, show with full opacity when mouseChanged.

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