Bug 944938 - Install the event tap only for wheel events. r=smichaud
authorMarkus Stange <mstange@themasta.com>
Sat, 07 Jun 2014 00:50:00 +0200
changeset 206577 ec4f84a6cc5a83b4d98485d4a01a3cad10d56152
parent 206576 2dd8b0d9fc4456a700f80c6a52898c28b87568f1
child 206578 6c2881dc61419924c9bf3f1f7000600492e47e30
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs944938
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 944938 - Install the event tap only for wheel events. r=smichaud
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -6759,17 +6759,17 @@ HandleEvent(CGEventTapProxy aProxy, CGEv
 
   mThread = [NSThread currentThread];
   ProcessSerialNumber currentProcess;
   GetCurrentProcess(&currentProcess);
   CFMachPortRef eventPort =
     CGEventTapCreateForPSN(&currentProcess,
                            kCGHeadInsertEventTap,
                            kCGEventTapOptionListenOnly,
-                           kCGEventMaskForAllEvents,
+                           CGEventMaskBit(kCGEventScrollWheel),
                            HandleEvent,
                            self);
   CFRunLoopSourceRef eventPortSource =
     CFMachPortCreateRunLoopSource(kCFAllocatorSystemDefault, eventPort, 0);
   CFRunLoopAddSource(CFRunLoopGetCurrent(), eventPortSource, kCFRunLoopCommonModes);
   CFRunLoopRun();
   CFRunLoopRemoveSource(CFRunLoopGetCurrent(), eventPortSource, kCFRunLoopCommonModes);
   CFRelease(eventPortSource);