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
parent
9fb536adda
commit
adb156e4dd
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue