diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-25 23:10:26 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-25 23:10:26 +0000 |
commit | 81d7a828f66b94e0885f2917c3f753bc4ee13fad (patch) | |
tree | 7f60ce0ad93c3a6194a86e0a505d08fb7e5ed4d8 | |
parent | 4e88148bcb5b6cff4b405cde1f5c480a90b1976a (diff) | |
download | chromium_src-81d7a828f66b94e0885f2917c3f753bc4ee13fad.zip chromium_src-81d7a828f66b94e0885f2917c3f753bc4ee13fad.tar.gz chromium_src-81d7a828f66b94e0885f2917c3f753bc4ee13fad.tar.bz2 |
[Mac] Don't call -[NSEvent touchesMatchingPhase:inView:] if we don't intend to recognize a gesture.
BUG=90408
TEST=On Leopard, swipe and don't crash.
Review URL: http://codereview.chromium.org/7471053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93989 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/cocoa/browser_window_controller.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index 06cbcfb..6e4a26a 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm @@ -1740,9 +1740,11 @@ typedef NSInteger NSWindowAnimationBehavior; // gesture does not do this, so it must be manually recognized. See the note // inside |-recognizeTwoFingerGestures| for detailed information on the // interaction of the different preferences. + if (![self recognizeTwoFingerGestures]) + return; NSSet* touches = [event touchesMatchingPhase:NSTouchPhaseAny inView:nil]; - if ([self recognizeTwoFingerGestures] && [touches count] >= 2) { + if ([touches count] >= 2) { twoFingerGestureTouches_.reset([[NSMutableDictionary alloc] init]); for (NSTouch* touch in touches) { [twoFingerGestureTouches_ setObject:touch forKey:touch.identity]; |