don't register for Carbon events we don't need. b=338166 r=mento

This commit is contained in:
joshmoz%gmail.com 2006-05-16 18:13:02 +00:00
Родитель 347e4651cb
Коммит fe4070c28d
2 изменённых файлов: 5 добавлений и 15 удалений

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

@ -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,