don't process menu events multiple times (do them only on keydown).

This commit is contained in:
pinkerton%netscape.com 1998-10-29 23:47:05 +00:00
Родитель 44abe875c4
Коммит f9a2d0f71f
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -329,12 +329,14 @@ void nsMacMessagePump::DoMouseMove(EventRecord &anEvent)
//-------------------------------------------------------------------------
//
// DoKey
//
//
// This is called for keydown, keyup, and key repeating events. So we need
// to be careful not to do things twice.
//-------------------------------------------------------------------------
void nsMacMessagePump::DoKey(EventRecord &anEvent)
{
char theChar = (char)(anEvent.message & charCodeMask);
if (anEvent.modifiers & cmdKey)
if ( (anEvent.what == keyDown) && ((anEvent.modifiers & cmdKey) != 0) )
{
// do a menu key command
long menuResult = ::MenuKey(theChar);