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 226097 b7b7c60ddcf0e76988c3d2216ebb0401dd61fc39
parent 226096 88c5eac1e0e5a98bd518de9412badd51e6ef3b0d
child 226098 e093e08145b11e4a6c406a028f772a9d83b4da35
push id7256
push userryanvm@gmail.com
push dateThu, 13 Nov 2014 21:42:57 +0000
treeherdermozilla-aurora@b7b7c60ddcf0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl, lmandel
bugs1017595
milestone35.0a2
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
@@ -573,24 +573,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;