Bug 1017595 - Links from external applications sometimes fail to open when Firefox is hidden. r=spohl, a=lmandel
authorSteven Michaud <smichaud@pobox.com>
Fri, 31 Oct 2014 17:14:44 -0500
changeset 226058 89c3e0133233
parent 226057 9e4c3c78fe01
child 226059 c486cd17bebb
child 226060 8a30f7117b2e
push id4128
push userryanvm@gmail.com
push date2014-11-13 21:43 +0000
treeherdermozilla-beta@89c3e0133233 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl, lmandel
bugs1017595
milestone34.0
Bug 1017595 - Links from external applications sometimes fail to open when Firefox is hidden. r=spohl, a=lmandel
widget/cocoa/nsAppShell.mm
--- a/widget/cocoa/nsAppShell.mm
+++ b/widget/cocoa/nsAppShell.mm
@@ -574,24 +574,25 @@ nsAppShell::ProcessNextNativeEvent(bool 
                                                                kEventQueueOptionsNone);
       if (!currentEvent) {
         continue;
       }
       EventAttributes attrs = GetEventAttributes(currentEvent);
       UInt32 eventKind = GetEventKind(currentEvent);
       UInt32 eventClass = GetEventClass(currentEvent);
       bool osCocoaEvent =
-        ((eventClass == 'appl') ||
+        ((eventClass == 'appl') || (eventClass == kEventClassAppleEvent) ||
          ((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.
+      // turned into an OS-defined Cocoa event, or otherwise needs AppKit
+      // processing.  Doing otherwise risks doing too much work here, and
+      // preventing the event from being properly processed by the AppKit
+      // framework.
       if ((attrs != kEventAttributeNone) || osCocoaEvent) {
         // Since we can't process the next event here (while aMayWait is false),
         // we want moreEvents to be false on return.
         eventProcessed = false;
         // This call to ReleaseEvent() matches a call to RetainEvent() in
         // AcquireFirstMatchingEventInQueue() above.
         ReleaseEvent(currentEvent);
         break;