Mac only support multitouch points, hence width/height 1. Also add
comment about performance related to multitouch events.
Change-Id: I307261492366e361e17f9edf446f456c07c87a22
Reviewed-on: http://codereview.qt-project.org/5162
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
m_contentView = [[QNSView alloc] initWithQWindow:tlw];
- // Accept touch events by default.
+ // ### Accept touch events by default.
+ // Beware that enabling touch events has a negative impact on the overall performance.
+ // We probably need a QWindowSystemInterface API to enable/disable touch events.
[m_contentView setAcceptsTouchEvents:YES];
setGeometry(tlw->geometry());
float ppiX = (qnpos.x() - _trackpadReferencePos.x()) * dsize.width;
float ppiY = (qnpos.y() - _trackpadReferencePos.y()) * dsize.height;
QPointF relativePos = _trackpadReferencePos - QPointF(ppiX, ppiY);
- _touchPoint.area = QRectF(_screenReferencePos - relativePos, QSize(dsize.width, dsize.height));
+ // Mac does not support area touch, only points, hence set width/height to 1.
+ _touchPoint.area = QRectF(_screenReferencePos - relativePos, QSize(1, 1));
}
QCocoaTouch *QCocoaTouch::findQCocoaTouch(NSTouch *nstouch)