зеркало из https://github.com/mozilla/pjs.git
don't register for Carbon events we don't need. b=338166 r=mento
This commit is contained in:
Родитель
347e4651cb
Коммит
fe4070c28d
|
@ -1177,16 +1177,11 @@ static pascal OSStatus MyMenuEventHandler(EventHandlerCallRef myHandler, EventRe
|
|||
|
||||
static OSStatus InstallMyMenuEventHandler(MenuRef menuRef, void* userData, EventHandlerRef* outHandler)
|
||||
{
|
||||
// do we really need all these events?
|
||||
static EventTypeSpec eventList[] = {
|
||||
{kEventClassMenu, kEventMenuBeginTracking},
|
||||
{kEventClassMenu, kEventMenuEndTracking},
|
||||
{kEventClassMenu, kEventMenuChangeTrackingMode},
|
||||
{kEventClassMenu, kEventMenuOpening},
|
||||
{kEventClassMenu, kEventMenuClosed},
|
||||
{kEventClassMenu, kEventMenuTargetItem},
|
||||
{kEventClassMenu, kEventMenuMatchKey},
|
||||
{kEventClassMenu, kEventMenuEnableItems}};
|
||||
{kEventClassMenu, kEventMenuOpening},
|
||||
{kEventClassMenu, kEventMenuClosed},
|
||||
{kEventClassMenu, kEventMenuTargetItem}
|
||||
};
|
||||
|
||||
static EventHandlerUPP gMyMenuEventHandlerUPP = NewEventHandlerUPP(&MyMenuEventHandler);
|
||||
OSStatus status = ::InstallMenuEventHandler(menuRef, gMyMenuEventHandlerUPP,
|
||||
|
|
|
@ -774,14 +774,9 @@ static OSStatus InstallMyMenuEventHandler(MenuRef menuRef, void* userData, Event
|
|||
{
|
||||
// install the event handler for the various carbon menu events.
|
||||
static EventTypeSpec eventList[] = {
|
||||
{ kEventClassMenu, kEventMenuBeginTracking },
|
||||
{ kEventClassMenu, kEventMenuEndTracking },
|
||||
{ kEventClassMenu, kEventMenuChangeTrackingMode },
|
||||
{ kEventClassMenu, kEventMenuOpening },
|
||||
{ kEventClassMenu, kEventMenuClosed },
|
||||
{ kEventClassMenu, kEventMenuTargetItem },
|
||||
{ kEventClassMenu, kEventMenuMatchKey },
|
||||
{ kEventClassMenu, kEventMenuEnableItems }
|
||||
{ kEventClassMenu, kEventMenuTargetItem }
|
||||
};
|
||||
static EventHandlerUPP gMyMenuEventHandlerUPP = NewEventHandlerUPP(&MyMenuEventHandler);
|
||||
return ::InstallMenuEventHandler(menuRef, gMyMenuEventHandlerUPP,
|
||||
|
|
Загрузка…
Ссылка в новой задаче