Commit 51a66e85 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: process FSC key event in the main interface (factor code)

parent 6ad5c698
......@@ -935,19 +935,10 @@ void FullscreenControllerWidget::leaveEvent( QEvent *event )
/**
* When you get pressed key, send it to video output
* FIXME: clearing focus by clearFocus() to not getting
* key press events didnt work
*/
void FullscreenControllerWidget::keyPressEvent( QKeyEvent *event )
{
int i_vlck = qtEventToVLCKey( event );
if( i_vlck > 0 )
{
var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlck );
event->accept();
}
else
event->ignore();
emit keyPressed( event );
}
/* */
......
......@@ -229,6 +229,9 @@ public:
void fullscreenChanged( vout_thread_t *, bool b_fs, int i_timeout );
void mouseChanged( vout_thread_t *, int i_mousex, int i_mousey );
signals:
void keyPressed( QKeyEvent * );
public slots:
void setVoutList( vout_thread_t **, int );
......
......@@ -416,6 +416,8 @@ void MainInterface::createMainWidget( QSettings *settings )
if( config_GetInt( p_intf, "qt-fs-controller" ) )
{
fullscreenControls = new FullscreenControllerWidget( p_intf, this );
CONNECT( fullscreenControls, keyPressed( QKeyEvent * ),
this, handleKeyPress( QKeyEvent * ) );
}
}
......
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