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

Try to fix the win32 compile.

parent ab9b3042
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
...@@ -860,10 +861,10 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, ...@@ -860,10 +861,10 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i,
p_hideTimer->setSingleShot( true ); p_hideTimer->setSingleShot( true );
/* slow hiding timer */ /* slow hiding timer */
#ifdef TRANSPARENCY #if HAVE_TRANSPARENCY
p_slowHideTimer = new QTimer( this ); p_slowHideTimer = new QTimer( this );
CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() ); CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
#endif #endif
adjustSize (); /* need to get real width and height for moving */ adjustSize (); /* need to get real width and height for moving */
...@@ -899,7 +900,6 @@ void FullscreenControllerWidget::hideFSControllerWidget() ...@@ -899,7 +900,6 @@ void FullscreenControllerWidget::hideFSControllerWidget()
#endif #endif
} }
#ifdef TRANSPARENCY
/** /**
* Hidding fullscreen controller slowly * Hidding fullscreen controller slowly
* Linux: need composite manager * Linux: need composite manager
...@@ -907,6 +907,7 @@ void FullscreenControllerWidget::hideFSControllerWidget() ...@@ -907,6 +907,7 @@ void FullscreenControllerWidget::hideFSControllerWidget()
*/ */
void FullscreenControllerWidget::slowHideFSC() void FullscreenControllerWidget::slowHideFSC()
{ {
#if HAVE_TRANSPARENCY
static bool first_call = true; static bool first_call = true;
if ( first_call ) if ( first_call )
...@@ -933,8 +934,8 @@ void FullscreenControllerWidget::slowHideFSC() ...@@ -933,8 +934,8 @@ void FullscreenControllerWidget::slowHideFSC()
p_slowHideTimer->stop(); p_slowHideTimer->stop();
} }
} }
}
#endif #endif
}
/** /**
* Get state of visibility of FS controller on screen * Get state of visibility of FS controller on screen
...@@ -973,9 +974,9 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) ...@@ -973,9 +974,9 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
show(); show();
#endif #endif
#ifdef TRANSPARENCY #if HAVE_TRANSPARENCY
setWindowOpacity( 0.75 ); setWindowOpacity( 0.75 );
#endif #endif
} }
else if ( type == FullscreenControlHide_Type ) else if ( type == FullscreenControlHide_Type )
{ {
...@@ -984,9 +985,9 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) ...@@ -984,9 +985,9 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
else if ( type == FullscreenControlPlanHide_Type && !b_mouseIsOver ) else if ( type == FullscreenControlPlanHide_Type && !b_mouseIsOver )
{ {
p_hideTimer->start( i_hideTimeout ); p_hideTimer->start( i_hideTimeout );
#ifdef TRANSPARENCY #if HAVE_TRANSPARENCY
p_slowHideTimer->start( i_hideTimeout / 2 ); p_slowHideTimer->start( i_hideTimeout / 2 );
#endif #endif
} }
} }
...@@ -1024,9 +1025,9 @@ void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event ) ...@@ -1024,9 +1025,9 @@ void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event )
void FullscreenControllerWidget::enterEvent( QEvent *event ) void FullscreenControllerWidget::enterEvent( QEvent *event )
{ {
p_hideTimer->stop(); p_hideTimer->stop();
#ifdef TRANSPARENCY #if HAVE_TRANSPARENCY
p_slowHideTimer->stop(); p_slowHideTimer->stop();
#endif #endif
b_mouseIsOver = true; b_mouseIsOver = true;
} }
...@@ -1036,9 +1037,9 @@ void FullscreenControllerWidget::enterEvent( QEvent *event ) ...@@ -1036,9 +1037,9 @@ void FullscreenControllerWidget::enterEvent( QEvent *event )
void FullscreenControllerWidget::leaveEvent( QEvent *event ) void FullscreenControllerWidget::leaveEvent( QEvent *event )
{ {
p_hideTimer->start( i_hideTimeout ); p_hideTimer->start( i_hideTimeout );
#ifdef TRANSPARENCY #if HAVE_TRANSPARENCY
p_slowHideTimer->start( i_hideTimeout / 2 ); p_slowHideTimer->start( i_hideTimeout / 2 );
#endif #endif
b_mouseIsOver = false; b_mouseIsOver = false;
} }
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <QWidget> #include <QWidget>
#include <QFrame> #include <QFrame>
#define VOLUME_MAX 200 #define VOLUME_MAX 200
/* on WIN32 hide() for fullscreen controller doesnt work, so it have to be /* on WIN32 hide() for fullscreen controller doesnt work, so it have to be
...@@ -49,15 +50,13 @@ ...@@ -49,15 +50,13 @@
#endif #endif
/* to trying transparency with fullscreen controller on windows enable that */ /* to trying transparency with fullscreen controller on windows enable that */
/* #define TRANSPARENCY */ #define HAVE_TRANSPARENCY 0
/* it can be enabled on-non windows systems,
/* it can be enabled on non windows systems,
but it will be transparent only with composite manager */ but it will be transparent only with composite manager */
#ifndef WIN32 #ifndef WIN32
#define TRANSPARENCY #define HAVE_TRANSPARENCY 1
#endif #endif
class ResizeEvent; class ResizeEvent;
class QPalette; class QPalette;
class QPixmap; class QPixmap;
...@@ -254,26 +253,23 @@ protected: ...@@ -254,26 +253,23 @@ protected:
private slots: private slots:
void hideFSControllerWidget(); void hideFSControllerWidget();
#ifdef TRANSPARENCY
void slowHideFSC(); void slowHideFSC();
#endif
private: private:
QTimer *p_hideTimer; QTimer *p_hideTimer;
#ifdef TRANSPARENCY #if HAVE_TRANSPARENCY
QTimer *p_slowHideTimer; QTimer *p_slowHideTimer;
#endif #endif
int i_lastPosX; int i_lastPosX;
int i_lastPosY; int i_lastPosY;
int i_hideTimeout; /* FSC hiding timeout, same as mouse hiding timeout */ int i_hideTimeout; /* FSC hiding timeout, same as mouse hiding timeout */
bool b_mouseIsOver; bool b_mouseIsOver;
#ifdef WIN32TRICK #ifdef WIN32TRICK
bool fscHidden; bool fscHidden;
#endif #endif
virtual void customEvent( QEvent *event ); virtual void customEvent( QEvent *event );
}; };
......
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