diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-24 09:02:51 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-24 09:02:51 (GMT) |
commit | b1c715f8214233f5b573ed58fc89c9dd70beabb4 (patch) | |
tree | bff329adc8f591e1f600fbe3fc68753bf44e00a6 /src/gui/kernel/qcocoaview_mac.mm | |
parent | 002e3f471025fe4f84d2dd8dd07c440808d7a839 (diff) | |
download | Qt-b1c715f8214233f5b573ed58fc89c9dd70beabb4.zip Qt-b1c715f8214233f5b573ed58fc89c9dd70beabb4.tar.gz Qt-b1c715f8214233f5b573ed58fc89c9dd70beabb4.tar.bz2 |
Add support for disabling touch on to enhance scrolling in Cocoa
On Mac/Cocoa, enabling touch on a widget slows down the scrolling
performance of the whole application. It seems Cocoa spends some
time in the background figuring out what to do with the touch
events, and whether or not it should convert them to scroll/wheel
events. Therefore, it makes sense to no subscribe for touch when
the mouse is not over the widget, This patch implements that
strategy, and the effect is huge when tested agains creator.
Rev-By: brad
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 575343f..18a2be1 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -153,6 +153,8 @@ static int qCocoaViewCount = 0; composing = false; sendKeyEvents = true; fromKeyDownEvent = false; + alienTouchCount = 0; + [self setHidden:YES]; return self; } |