diff options
author | Morten Johan Sorvig <morten.sorvig@nokia.com> | 2012-08-08 11:44:39 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-22 07:01:17 +0200 |
commit | 6c1670d8c273819435867c42725c0db0eee597dc (patch) | |
tree | 9de8f59b14624cb8c9678fa47820771f95e5b9d4 /src/plugins | |
parent | 09dd19df5c4b708960e5aade568eb15d996ef200 (diff) |
Add hint for touch -> mouse event synthesizing
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 <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |