Mac applicationDockMenu delegate method not called after process restart. Patch by Steven Michaud. r=josh r=bsmedberg

This commit is contained in:
joshmoz@gmail.com 2007-05-16 19:10:19 -07:00
Родитель 517386beb6
Коммит 80fa4c32e6
3 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -42,6 +42,7 @@
#ifndef __MacApplicationDelegate_h__
#define __MacApplicationDelegate_h__
void EnsureUseCocoaDockAPI(void);
void SetupMacApplicationDelegate(void);
#endif

Просмотреть файл

@ -63,6 +63,14 @@
// Something to call from non-objective code.
// This is needed, on relaunch, to force the OS to use the "Cocoa Dock API"
// instead of the "Carbon Dock API". For more info see bmo bug 377166.
void
EnsureUseCocoaDockAPI()
{
[NSApplication sharedApplication];
}
void
SetupMacApplicationDelegate()
{

Просмотреть файл

@ -50,8 +50,6 @@
#ifdef XP_MACOSX
#include "MacLaunchHelper.h"
#endif
#ifdef MOZ_WIDGET_COCOA
#include "MacApplicationDelegate.h"
#endif
@ -2342,6 +2340,11 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
#ifdef XP_MACOSX
if (PR_GetEnv("MOZ_LAUNCHED_CHILD")) {
// This is needed, on relaunch, to force the OS to use the "Cocoa Dock
// API". Otherwise the call to ReceiveNextEvent() below will make it
// use the "Carbon Dock API". For more info see bmo bug 377166.
EnsureUseCocoaDockAPI();
// When the app relaunches, the original process exits. This causes
// the dock tile to stop bouncing, lose the "running" triangle, and
// if the tile does not permanently reside in the Dock, even disappear.