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 207661 ec4f84a6cc5a83b4d98485d4a01a3cad10d56152
parent 207660 2dd8b0d9fc4456a700f80c6a52898c28b87568f1
child 207662 6c2881dc61419924c9bf3f1f7000600492e47e30
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [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);