From 6c1670d8c273819435867c42725c0db0eee597dc Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Wed, 8 Aug 2012 11:44:39 +0200 Subject: Add hint for touch -> mouse event synthesizing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 7808ec79 changes QApplication to synthesize mouse events from (unhandled) touch events. On Mac OS X this creates a conflict for two-finger scroll swipes, which generates both touch events and mouse wheel events: scrolling in QTextEdit will also select the text. Add a SynthesizeMouseFromTouchEvents platform style hint that enables the event synthesising. Set to true by default and false in Cocoa. Change-Id: I1ffa5a141476aa38b81ce92a87eff676c7ec2276 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoaintegration.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm') diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 95155f3540..65ee03d53f 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -313,6 +313,9 @@ QVariant QCocoaIntegration::styleHint(StyleHint hint) const { if (hint == QPlatformIntegration::FontSmoothingGamma) return 2.0; + if (hint == QPlatformIntegration::SynthesizeMouseFromTouchEvents) + return false; + return QPlatformIntegration::styleHint(hint); } -- cgit v1.2.3