Fix globalPos() in scrollwheel events on OSX.
The window position was getting passed as both the window and global positions. QTBUG-29543 Change-Id: I24746675e5ba45adbd054742877bd2fe783d6608 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
733430636d
commit
02a1243dda
@ -645,9 +645,8 @@ static QTouchDevice *touchDevice = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
NSPoint windowPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil];
|
||||
QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
|
||||
QPoint qt_windowPoint, qt_screenPoint;
|
||||
[self convertFromEvent:theEvent toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint];
|
||||
NSTimeInterval timestamp = [theEvent timestamp];
|
||||
ulong qt_timestamp = timestamp * 1000;
|
||||
|
||||
@ -665,7 +664,7 @@ static QTouchDevice *touchDevice = 0;
|
||||
currentWheelModifiers = [self convertKeyModifiers:[theEvent modifierFlags]];
|
||||
}
|
||||
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta, currentWheelModifiers);
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers);
|
||||
|
||||
if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled) {
|
||||
currentWheelModifiers = Qt::NoModifier;
|
||||
@ -673,7 +672,7 @@ static QTouchDevice *touchDevice = 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta,
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta,
|
||||
[self convertKeyModifiers:[theEvent modifierFlags]]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user