QWheelEvent on OSX: phase changes to ScrollEnd after momentum phase
The phase changes to ScrollEnd as soon as the user's fingers are lifted from the trackpad; then the OS can optionally continue sending scroll events to simulate deceleration, which are translated into more QWheelEvents with phase ScrollUpdate. With this patch, the phase of the final event after the momentum phase will be ScrollEnd to indicate that the scrolling is completely finished. [ChangeLog][QtGui][QWheelEvent] on OSX, trackpad wheel event phase transitions occur in the order ScrollBegin, ScrollUpdate, ..., ScrollEnd, ScrollUpdate, ..., ScrollEnd, where the second batch of updates represent momentum events (inertial scrolling). Change-Id: I7404ed6fbbeaff6b1fa63e226fe1800494986b7b Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
parent
cd83859bd6
commit
317c341a66
@ -1326,7 +1326,8 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
if (!m_scrolling)
|
||||
ph = Qt::ScrollBegin;
|
||||
m_scrolling = true;
|
||||
} else if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled) {
|
||||
} else if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled ||
|
||||
momentumPhase == NSEventPhaseEnded || momentumPhase == NSEventPhaseCancelled) {
|
||||
ph = Qt::ScrollEnd;
|
||||
m_scrolling = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user