From b3d49f6d203e37abc2bc88df816debe2cdf5883c Mon Sep 17 00:00:00 2001 From: hyatt Date: Tue, 16 Jun 1998 23:10:17 +0000 Subject: [PATCH] Fixes for bug #122733 and #123245. Both reviewed by blythe. git-svn-id: svn://10.0.0.236/trunk@3949 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/winfe/navcntr.cpp | 12 ++++++++++++ mozilla/cmd/winfe/navcntr.h | 2 ++ mozilla/cmd/winfe/rdfliner.cpp | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) 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(); }