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

Qt: FSC - remove the WIN32 special mode.

This makes Windows use the same mode with transparency than on Linux.
This removes the opacity trick to hide() the code.
This fix a few issues that were happening and difficult to fix because of this difficulty.

It will probably break stuffs for people on OLD windows version (2000,XP) with broken graphic cards... (Deactivate it by yourself) But I have spent enough time on this code.
parent 7243c2e3
......@@ -706,13 +706,6 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
adjustSize (); /* need to get real width and height for moving */
#ifdef WIN32TRICK
setWindowOpacity( 0.0 );
b_fscHidden = true;
adjustSize();
show();
#endif
vlc_mutex_init_recursive( &lock );
CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ),
......@@ -765,18 +758,8 @@ void FullscreenControllerWidget::showFSC()
{
centerFSC( number );
}
#ifdef WIN32TRICK
// after quiting and going to fs, we need to call show()
if( isHidden() )
show();
if( b_fscHidden )
{
b_fscHidden = false;
setWindowOpacity( 1.0 );
}
#else
show();
#endif
#if HAVE_TRANSPARENCY
setWindowOpacity( DEFAULT_OPACITY );
......@@ -790,12 +773,7 @@ void FullscreenControllerWidget::showFSC()
*/
void FullscreenControllerWidget::hideFSC()
{
#ifdef WIN32TRICK
b_fscHidden = true;
setWindowOpacity( 0.0 ); // simulate hidding
#else
hide();
#endif
}
/**
......@@ -835,11 +813,7 @@ void FullscreenControllerWidget::slowHideFSC()
}
else
{
#ifdef WIN32TRICK
if ( windowOpacity() > 0.0 && !b_fscHidden )
#else
if ( windowOpacity() > 0.0 )
#endif
{
/* we should use 0.01 because of 100 pieces ^^^
but than it cannt be done in time */
......@@ -868,11 +842,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
vlc_mutex_unlock( &lock );
if( b_fs )
{
#ifdef WIN32TRICK
if( b_fscHidden )
#else
if( isHidden() )
#endif
{
p_hideTimer->stop();
showFSC();
......@@ -886,11 +856,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
#ifdef WIN32TRICK
if( b_fs && b_fscHidden )
#else
if( b_fs && !isVisible() )
#endif
showFSC();
break;
case FullscreenControlHide_Type:
......
......@@ -206,23 +206,14 @@ signals:
void advancedControlsToggled( bool );
};
/* on WIN32 hide() for fullscreen controller doesnt work, so it have to be
done by trick with setting the opacity of window */
#ifdef WIN32
#define WIN32TRICK
#endif
/* to trying transparency with fullscreen controller on windows enable that */
/* it can be enabled on-non windows systems,
but it will be transparent only with composite manager */
#ifndef WIN32
#define HAVE_TRANSPARENCY 1
#else
#define HAVE_TRANSPARENCY 0
#endif
#define HAVE_TRANSPARENCY 1
/* Default value of opacity for FS controller */
#define DEFAULT_OPACITY 0.75
#define DEFAULT_OPACITY 0.70
/***********************************
* Fullscreen controller
......@@ -273,10 +264,6 @@ private:
int i_screennumber;
QRect screenRes;
#ifdef WIN32TRICK
bool b_fscHidden;
#endif
/* List of vouts currently tracked */
QList<vout_thread_t *> vout;
......
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