fix for 29016 (again) don't pass the click through if there is a popup, just roll it up. this is what macOS native context menus do. r=sfraser.

This commit is contained in:
pinkerton%netscape.com 2000-03-17 01:42:19 +00:00
parent b22afec3a7
commit ebfba4f468

View File

@ -397,15 +397,20 @@ void nsMacMessagePump::DoMouseDown(EventRecord &anEvent)
case inMenuBar:
{
long menuResult = ::MenuSelect(anEvent.where);
if (HiWord(menuResult) != 0)
{
menuResult = ConvertOSMenuResultToPPMenuResult(menuResult);
DoMenu(anEvent, menuResult);
}
// If a xul popup is displayed, roll it up and don't allow the click
// through to the menu code. This is how MacOS context menus work, so
// I think this is a valid solution.
if ( gRollupListener && gRollupWidget )
gRollupListener->Rollup();
break;
else {
long menuResult = ::MenuSelect(anEvent.where);
if (HiWord(menuResult) != 0)
{
menuResult = ConvertOSMenuResultToPPMenuResult(menuResult);
DoMenu(anEvent, menuResult);
}
break;
}
}
case inContent: