Bug 1016200 - Single click stop working in web content, require double click. r=spohl a=lmandel
authorSteven Michaud <smichaud@pobox.com>
Thu, 10 Jul 2014 18:04:52 -0500
changeset 207820 57da94b8da21b54f164f011865b35807419fd7bb
parent 207819 d9c3d923cb3e24afc0a1d7d8a4500037200121b5
child 207821 827bffaed940fe3e0b83a8507faf74b5c543547e
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)
reviewersspohl, lmandel
bugs1016200
milestone32.0a2
Bug 1016200 - Single click stop working in web content, require double click. r=spohl a=lmandel
widget/cocoa/nsAppShell.mm
--- a/widget/cocoa/nsAppShell.mm
+++ b/widget/cocoa/nsAppShell.mm
@@ -480,19 +480,20 @@ nsAppShell::ProcessNextNativeEvent(bool 
       // window server.
       EventRef currentEvent = AcquireFirstMatchingEventInQueue(currentEventQueue, 0, NULL,
                                                                kEventQueueOptionsNone);
       if (!currentEvent) {
         continue;
       }
       EventAttributes attrs = GetEventAttributes(currentEvent);
       UInt32 eventKind = GetEventKind(currentEvent);
+      UInt32 eventClass = GetEventClass(currentEvent);
       bool osCocoaEvent =
-        ((GetEventClass(currentEvent) == 'cgs ') &&
-         ((eventKind == NSAppKitDefined) || (eventKind == NSSystemDefined)));
+        ((eventClass == 'appl') ||
+         ((eventClass == 'cgs ') && (eventKind != NSApplicationDefined)));
       // If attrs is kEventAttributeUserEvent or kEventAttributeMonitored
       // (i.e. a user input event), we shouldn't process it here while
       // aMayWait is false.  Likewise if currentEvent will eventually be
       // turned into an OS-defined Cocoa event.  Doing otherwise risks
       // doing too much work here, and preventing the event from being
       // properly processed as a Cocoa event.
       if ((attrs != kEventAttributeNone) || osCocoaEvent) {
         // Since we can't process the next event here (while aMayWait is false),