Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit fb089519 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix hiccups when using wheel on the Wacom's tablets

The tablet generates ctrl-down+wheel+ctrl-up group of events, so we
shouldn't reset the accumulated wheen delta on every key and tablet
move event.

BUG:381452
parent c30c6f42
......@@ -276,11 +276,30 @@ bool KisInputManager::compressMoveEventCommon(Event *event)
return retval;
}
bool shouldResetWheelDelta(QEvent * event)
{
return
event->type() == QEvent::FocusIn ||
event->type() == QEvent::FocusOut ||
event->type() == QEvent::MouseButtonPress ||
event->type() == QEvent::MouseButtonRelease ||
event->type() == QEvent::MouseButtonDblClick ||
event->type() == QEvent::TabletPress ||
event->type() == QEvent::TabletRelease ||
event->type() == QEvent::Enter ||
event->type() == QEvent::Leave ||
event->type() == QEvent::TouchBegin ||
event->type() == QEvent::TouchEnd ||
event->type() == QEvent::TouchCancel ||
event->type() == QEvent::NativeGesture;
}
bool KisInputManager::eventFilterImpl(QEvent * event)
{
bool retval = false;
if (event->type() != QEvent::Wheel) {
if (shouldResetWheelDelta(event)) {
d->accumulatedScrollDelta = 0;
}
......
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