Commit e17bf628 authored by Laurent Aimar's avatar Laurent Aimar

Fixed fullscreen controler race conditions and ugly static variables.

It is disabled by default, look for the two lines with
	//XXX uncomment for fullscreen controler
to enable it. Please report success/failure in order to enable it by
default (linux/win32).
parent ae059a3c
......@@ -236,13 +236,6 @@ signals:
/***********************************
* Fullscreen controller
***********************************/
static int showFullscreenControllCallback(vlc_object_t *vlc_object, const char *variable, vlc_value_t old_val,
vlc_value_t new_val, void *data);
static int regMouseMoveCallback(vlc_object_t *vlc_object, const char *variable, vlc_value_t old_val,
vlc_value_t new_val, void *data);
class FullscreenControllerWidget : public ControlsWidget
{
Q_OBJECT
......@@ -250,14 +243,10 @@ public:
FullscreenControllerWidget( intf_thread_t *, MainInterface*, bool, bool );
virtual ~FullscreenControllerWidget();
void setHideTimeout( int hideTimeout ) { i_hideTimeout = hideTimeout; }
void setIsFullscreen( bool isFS ) { b_isFullscreen = isFS; }
void regFullscreenCallback( vout_thread_t *p_vout );
bool isFSCHidden();
public slots:
void unregFullscreenCallback();
/* */
void attachVout( vout_thread_t *p_vout );
void detachVout( vout_thread_t *p_vout );
void fullscreenChanged( vout_thread_t *, bool b_fs, int i_timeout );
protected:
friend class MainInterface;
......@@ -270,27 +259,37 @@ protected:
virtual void keyPressEvent( QKeyEvent *event );
private slots:
void hideFSControllerWidget();
void showFSC();
void planHideFSC();
void hideFSC();
void slowHideFSC();
private:
QTimer *p_hideTimer;
#if HAVE_TRANSPARENCY
QTimer *p_slowHideTimer;
#endif
int i_lastPosX;
int i_lastPosY;
int i_hideTimeout; /* FSC hiding timeout, same as mouse hiding timeout */
bool b_mouseIsOver;
bool b_isFullscreen;
int i_mouse_last_x;
int i_mouse_last_y;
bool b_mouse_over;
bool b_slow_hide_begin;
int i_slow_hide_timeout;
#ifdef WIN32TRICK
bool fscHidden;
#endif
virtual void customEvent( QEvent *event );
/* Shared variable between FSC and VLC (protected by a lock) */
vlc_mutex_t lock;
bool b_fullscreen;
int i_hide_timeout; /* FSC hiding timeout, same as mouse hiding timeout */
};
......
......@@ -99,7 +99,6 @@ void InputManager::setInput( input_thread_t *_p_input )
p_input = NULL;
i_input_id = 0;
emit rateChanged( INPUT_RATE_DEFAULT );
emit inputUnset();
}
}
......
......@@ -119,8 +119,6 @@ signals:
/// Play/pause status
void statusChanged( int );
void artChanged( QString );
/// Controll of fullscreen controller
void inputUnset();
/// Teletext
void teletextEnabled( bool );
void toggleTelexButtons();
......
......@@ -228,10 +228,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
CONNECT( fullscreenControls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
CONNECT( THEMIM->getIM(), inputUnset(),
fullscreenControls, unregFullscreenCallback() );
/* Size and placement of interface */
QVLCTools::restoreWidgetPosition(settings,this,QSize(350,60));
......@@ -682,12 +678,17 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
// emit askVideoToResize( *pi_width, *pi_height );
emit askUpdate();
//XXX uncomment for fullscreen controler
//fullscreenControls->attachVout( p_nvout );
}
return ret;
}
void MainInterface::releaseVideo( vout_thread_t *p_vout, void *p_win )
{
//XXX uncomment for fullscreen controler
//fullscreenControls->detachVout( p_vout );
emit askReleaseVideo( p_win );
}
......
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