diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index da3e6277c6..1d59592e7d 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -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]]); } }