fix for the mac part of bug #3675. We were dispatching all menu events twice.

This commit is contained in:
pinkerton%netscape.com 1999-03-12 23:02:33 +00:00
Родитель 547e95ecf9
Коммит 6ebf7db132
1 изменённых файлов: 0 добавлений и 15 удалений

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

@ -156,21 +156,6 @@ PRBool nsMacEventHandler::HandleMenuCommand(
// propagate the event through the different parents all the way up to the window // propagate the event through the different parents all the way up to the window
PRBool eventHandled = focusedWidget->DispatchWindowEvent(menuEvent); PRBool eventHandled = focusedWidget->DispatchWindowEvent(menuEvent);
// saari - The event was falling through to a view which was handling it before
// the mTopLevelWidget with the nsMenuListener registered on it had a chance to
// dispatch the event to the nsMenuBar. So now we dispatch first to mTopLevelWidget,
// and thus the menu listener, and then everyone else.
// I think it is a bug that a view should handle a menu event at all, the menu event
// isn't logically contained in a view's visible region, yet the code still executes
// that way. The way we should have sub-widgets or views having overriding menubars
// is via a global menu manager (not written yet) that manages the current menubar
// state as various widgets go in and out of focus and change the menubar contents.
if(! eventHandled )
{
menuEvent.widget = mTopLevelWidget;
eventHandled = mTopLevelWidget->DispatchWindowEvent(menuEvent);
}
if (! eventHandled) if (! eventHandled)
{ {
nsCOMPtr<nsWindow> grandParent; nsCOMPtr<nsWindow> grandParent;