Cocoa: Fix trackpad scrolling modifiers.

We would reset the keyboard modifier state on
NSEventPhaseEnded, which meant that the state would
be NoModifier as soon as the fingers left the trackpad.

We want the modifier state to stay constant for the
duration of the gesture. Remove the "reset" code and
rely on setting currentWheelModifiers on NSEventPhaseNone
only.

Task-number: QTBUG-40197
Change-Id: I615aa5e1148b2b824f1a585bc042c9dbb3f1f250
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
bb10
Morten Johan Sørvig 2014-10-22 01:52:01 +02:00
parent 3272ef4aaf
commit b79ba9eade
1 changed files with 0 additions and 4 deletions

View File

@ -1359,10 +1359,6 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
}
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph);
if (momentumPhase == NSEventPhaseEnded || momentumPhase == NSEventPhaseCancelled || momentumPhase == NSEventPhaseNone) {
currentWheelModifiers = Qt::NoModifier;
}
} else
#endif
{