зеркало из https://github.com/mozilla/gecko-dev.git
Bug 179567. Cannot dismiss menu by clicking on menu bar. r=pinkerton, sr=bryner
This commit is contained in:
Родитель
d80c02ce93
Коммит
d1bba7f327
|
@ -703,25 +703,20 @@ nsMenuBarFrame :: KillPendingTimers ( )
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsMenuBarFrame::GetWidget(nsIWidget **aWidget)
|
nsMenuBarFrame::GetWidget(nsIWidget **aWidget)
|
||||||
{
|
{
|
||||||
// (pinkerton/hyatt)
|
// We need to add the menubar to the submenu widget chain now,
|
||||||
// since the menubar is a menuparent but not a menuItem, the win32 rollup code
|
// because we no longer consume clicks outside the menu.
|
||||||
// would erroneously add the entire top-level window to the widget list built up for
|
// If we don't, we won't toggle close when the user clicks
|
||||||
// determining if a click is in a submenu's menu chain. To get around this, we just
|
// a menu item that's open in the menu bar.
|
||||||
// don't let the menubar have a widget. Things seem to work because the dismissal
|
// We'd already be rolled up, so it would toggle
|
||||||
// listener is registered when a new menu is popped up, which is the only real reason
|
// open instead of closed.
|
||||||
// why we need a widget at all.
|
|
||||||
*aWidget = nsnull;
|
|
||||||
return NS_OK;
|
|
||||||
|
|
||||||
#if DONT_WANT_TO_DO_THIS
|
*aWidget = nsnull;
|
||||||
// Get parent view
|
|
||||||
nsIView * view = nsnull;
|
nsIView * view = nsnull;
|
||||||
nsMenuPopupFrame::GetNearestEnclosingView(mPresContext, this, &view);
|
nsMenuPopupFrame::GetRootViewForPopup(mPresContext, this, &view);
|
||||||
if (!view)
|
if (!view)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
view->GetWidget(*aWidget);
|
return view->GetWidget(*aWidget);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
Загрузка…
Ссылка в новой задаче