[vlc-commits] qt: Remove HAVE_TRANSPARENCY

Hugo Beauzée-Luyssen git at videolan.org
Tue Mar 27 12:07:05 CEST 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar 26 13:49:19 2018 +0200| [a3cbcf46aef8b5daa10aaa1c2fdbbf725c628fd8] | committer: Hugo Beauzée-Luyssen

qt: Remove HAVE_TRANSPARENCY

It's always been set to 1 since 2009

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

 modules/gui/qt/components/controller.cpp | 18 +-----------------
 modules/gui/qt/components/controller.hpp |  8 --------
 2 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp
index 07fbf0e28f..e10b1e4208 100644
--- a/modules/gui/qt/components/controller.cpp
+++ b/modules/gui/qt/components/controller.cpp
@@ -793,10 +793,8 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWi
     b_mouse_over        = false;
     i_mouse_last_move_x = -1;
     i_mouse_last_move_y = -1;
-#if HAVE_TRANSPARENCY
     b_slow_hide_begin   = false;
     i_slow_hide_timeout = 1;
-#endif
     b_fullscreen        = false;
     i_hide_timeout      = 1;
     i_screennumber      = -1;
@@ -833,11 +831,9 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWi
     CONNECT( p_hideTimer, timeout(), this, hideFSC() );
 
     /* slow hiding timer */
-#if HAVE_TRANSPARENCY
     p_slowHideTimer = new QTimer( this );
     CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
     f_opacity = var_InheritFloat( p_intf, "qt-fs-opacity" );
-#endif
 
     i_sensitivity = var_InheritInteger( p_intf, "qt-fs-sensitivity" );
 
@@ -926,9 +922,7 @@ void FullscreenControllerWidget::showFSC()
 {
     restoreFSC();
 
-#if HAVE_TRANSPARENCY
     setWindowOpacity( f_opacity );
-#endif
 
     show();
 }
@@ -944,11 +938,9 @@ void FullscreenControllerWidget::planHideFSC()
 
     p_hideTimer->start( i_timeout );
 
-#if HAVE_TRANSPARENCY
     b_slow_hide_begin = true;
     i_slow_hide_timeout = i_timeout;
     p_slowHideTimer->start( i_slow_hide_timeout / 2 );
-#endif
 }
 
 /**
@@ -958,7 +950,6 @@ void FullscreenControllerWidget::planHideFSC()
  */
 void FullscreenControllerWidget::slowHideFSC()
 {
-#if HAVE_TRANSPARENCY
     if( b_slow_hide_begin )
     {
         b_slow_hide_begin = false;
@@ -980,7 +971,6 @@ void FullscreenControllerWidget::slowHideFSC()
          if ( windowOpacity() <= 0.0 )
              p_slowHideTimer->stop();
     }
-#endif
 }
 
 void FullscreenControllerWidget::updateFullwidthGeometry( int number )
@@ -1046,11 +1036,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
             b_fs = b_fullscreen;
             vlc_mutex_unlock( &lock );
 
-            if( b_fs && ( isHidden()
-#if HAVE_TRANSPARENCY
-                 || p_slowHideTimer->isActive()
-#endif
-                    ) )
+            if( b_fs && ( isHidden() || p_slowHideTimer->isActive() ) )
                 showFSC();
 
             break;
@@ -1120,10 +1106,8 @@ void FullscreenControllerWidget::enterEvent( QEvent *event )
     b_mouse_over = true;
 
     p_hideTimer->stop();
-#if HAVE_TRANSPARENCY
     p_slowHideTimer->stop();
     setWindowOpacity( f_opacity );
-#endif
     event->accept();
 }
 
diff --git a/modules/gui/qt/components/controller.hpp b/modules/gui/qt/components/controller.hpp
index 25d4f4b00c..1b68db5645 100644
--- a/modules/gui/qt/components/controller.hpp
+++ b/modules/gui/qt/components/controller.hpp
@@ -229,12 +229,6 @@ signals:
     void advancedControlsToggled( bool );
 };
 
-
-/* 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 */
-#define HAVE_TRANSPARENCY 1
-
 /* Default value of opacity for FS controller */
 #define DEFAULT_OPACITY 0.70
 
@@ -292,12 +286,10 @@ private slots:
 
 private:
     QTimer *p_hideTimer;
-#if HAVE_TRANSPARENCY
     QTimer *p_slowHideTimer;
     bool b_slow_hide_begin;
     int  i_slow_hide_timeout;
     float f_opacity;
-#endif
 
     int i_mouse_last_x, i_mouse_last_y;
     bool b_mouse_over;



More information about the vlc-commits mailing list