Commit 7dab7f2f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: do not react to right-click to mute volume

This is counter-intuitive.
As asked by etix
parent c912d31a
...@@ -210,11 +210,13 @@ void SoundWidget::setMuted( bool mute ) ...@@ -210,11 +210,13 @@ void SoundWidget::setMuted( bool mute )
bool SoundWidget::eventFilter( QObject *obj, QEvent *e ) bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
{ {
VLC_UNUSED( obj ); VLC_UNUSED( obj );
if (e->type() == QEvent::MouseButtonPress ) if( e->type() == QEvent::MouseButtonPress )
{
QMouseEvent *event = static_cast<QMouseEvent*>(e);
if( event->button() != Qt::RightButton )
{ {
if( volumeSlider->orientation() == Qt::Vertical ) if( volumeSlider->orientation() == Qt::Vertical )
{ {
QMouseEvent *event = static_cast<QMouseEvent*>(e);
showVolumeMenu( event->pos() ); showVolumeMenu( event->pos() );
} }
else else
...@@ -224,11 +226,9 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e ) ...@@ -224,11 +226,9 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
e->accept(); e->accept();
return true; return true;
} }
else }
{
e->ignore(); e->ignore();
return false; return false;
}
} }
/** /**
......
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