From adb156e4dd64609ba6c0b172e9c428a79e306a7c Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Wed, 17 Oct 2012 10:16:07 +0200 Subject: Cocoa: Disable touch events. Enabling touch events has a negative impact on overall performance. In particular, enabling touch events seems to disable scroll event compression, resulting scroll processing lag. Until we find a solution where we can have both proper scrolling and touch events we choose scrolling over touch events. Applications that disagree can enable touch events manually: NSView *qtView = (NSView *)QGuiApplication::platformNativeInterface()-> nativeResourceForWindow("nsview", qtWindow); [qtView setAcceptsTouchEvents:YES]; Change-Id: I85cdd6e8c8ed8685c6cd5418c89fed6af02887cd Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/cocoa/qcocoawindow.mm | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/plugins/platforms/cocoa') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index b9ad35600e..d6b4ee68a9 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -703,11 +703,6 @@ void QCocoaWindow::setNSWindow(NSWindow *window) name:nil // Get all notifications object:m_nsWindow]; - // ### 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]; - [window setContentView:m_contentView]; } -- cgit v1.2.3