diff --git a/mozilla/cmd/winfe/navcntr.cpp b/mozilla/cmd/winfe/navcntr.cpp index ac21e428cca..b356e06f282 100644 --- a/mozilla/cmd/winfe/navcntr.cpp +++ b/mozilla/cmd/winfe/navcntr.cpp @@ -341,6 +341,11 @@ BOOL CSelectorButton::CreateRightMouseMenu() // Build the actual menu. m_MenuCommandMap.Clear(); + // Set the selected view, but do a mask if we're closed so we don't end up opening the pane. + + HT_SetSelectedView(HT_GetPane(m_HTView), m_HTView); + HT_SetSelection(HT_TopNode(m_HTView)); + HT_Cursor theCursor = HT_NewContextualMenuCursor(m_HTView, PR_TRUE, PR_FALSE); if (theCursor != NULL) { @@ -361,8 +366,15 @@ BOOL CSelectorButton::CreateRightMouseMenu() } HT_DeleteCursor(theCursor); } + return TRUE; } + +void CSelectorButton::DisplayAndTrackMenu() +{ + CRDFToolbarButton::DisplayAndTrackMenu(); +} + ///////////////////////////////////////////////////////////////////////////// // CNavCenterFrame diff --git a/mozilla/cmd/winfe/navcntr.h b/mozilla/cmd/winfe/navcntr.h index e4a8efe768d..00216852a22 100644 --- a/mozilla/cmd/winfe/navcntr.h +++ b/mozilla/cmd/winfe/navcntr.h @@ -96,6 +96,8 @@ public: virtual BOOL UseLargeIcons() { return TRUE; } + virtual void DisplayAndTrackMenu(void); + virtual void OnAction(void); int Create(CWnd *pParent, int nToolbarStyle, CSize noviceButtonSize, CSize advancedButtonSize, diff --git a/mozilla/cmd/winfe/rdfliner.cpp b/mozilla/cmd/winfe/rdfliner.cpp index 7d581d2b359..e6c24a18e5f 100644 --- a/mozilla/cmd/winfe/rdfliner.cpp +++ b/mozilla/cmd/winfe/rdfliner.cpp @@ -3759,7 +3759,7 @@ extern "C" MWContext* FE_GetRDFContext(void) // The context's GetDialogOwner() function. CWnd* CRDFCX::GetDialogOwner() const { - if (m_pCurrentRDFWindow == NULL) + if (m_pCurrentRDFWindow == NULL || m_pCurrentRDFWindow->m_hWnd == NULL) return CWnd::GetDesktopWindow(); return m_pCurrentRDFWindow->GetTopLevelFrame(); }