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 <richard.gustavsen@digia.com>
bb10
Morten Johan Sorvig 2012-10-17 10:16:07 +02:00 committed by The Qt Project
parent 9fb536adda
commit adb156e4dd
1 changed files with 0 additions and 5 deletions

View File

@ -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];
}