]> git.sesse.net Git - vlc/commitdiff
Qt: FSC - remove the WIN32 special mode.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 10 Jun 2009 16:37:23 +0000 (18:37 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 10 Jun 2009 16:37:23 +0000 (18:37 +0200)
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.

modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.hpp

index e72cb9190beb0f232632daf4073d2989e639b8ac..5ee5d63a362d452eba68f6f8095f4657cbfc4725 100644 (file)
@@ -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:
index 42a6e64d0a011d0c7ca399d48a9976bf42cef8ed..45f42c885acce4d447920066fbbf008621bb9147 100644 (file)
@@ -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;