hide horizontal wheel events from the deco list

BUG: 304799
FIXED-IN: 4.9.1
REVIEW: 105934
This commit is contained in:
Thomas Lübking 2012-08-08 19:52:38 +02:00
parent f945131cf3
commit 65b012ebe9

View file

@ -121,6 +121,7 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const QVariantList &
connect(m_ui->decorationList->verticalScrollBar(), SIGNAL(valueChanged(int)), SLOT(updateViewPosition(int))); connect(m_ui->decorationList->verticalScrollBar(), SIGNAL(valueChanged(int)), SLOT(updateViewPosition(int)));
m_ui->decorationList->installEventFilter(this); m_ui->decorationList->installEventFilter(this);
m_ui->decorationList->viewport()->installEventFilter(this);
KAboutData *about = KAboutData *about =
new KAboutData(I18N_NOOP("kcmkwindecoration"), 0, new KAboutData(I18N_NOOP("kcmkwindecoration"), 0,
@ -404,6 +405,10 @@ bool KWinDecorationModule::eventFilter(QObject *o, QEvent *e)
return true; return true;
} }
} }
} else if (m_ui->decorationList->viewport()) {
if (e->type() == QEvent::Wheel) {
return static_cast<QWheelEvent*>(e)->orientation() == Qt::Horizontal;
}
} }
return KCModule::eventFilter(o, e); return KCModule::eventFilter(o, e);
} }