Bug 1017595 - Links from external applications sometimes fail to open when Firefox is hidden. r=spohl
authorSteven Michaud <smichaud@pobox.com>
Fri, 31 Oct 2014 17:14:44 -0500
changeset 213461 89282ba7eec983259684c65eebf3a9d4b7d2f525
parent 213460 883b62c5b1e1f001cd779156dc927e36c4d3880e
child 213464 a20982886f52fa60f3c879b87d92a5ed9c848448
push id51234
push usersmichaud@pobox.com
push dateFri, 31 Oct 2014 22:15:06 +0000
treeherdermozilla-inbound@89282ba7eec9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl
bugs1017595
milestone36.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 1017595 - Links from external applications sometimes fail to open when Firefox is hidden. r=spohl
widget/cocoa/nsAppShell.mm
--- a/widget/cocoa/nsAppShell.mm
+++ b/widget/cocoa/nsAppShell.mm
@@ -558,24 +558,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;