diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index da9dff9609..61e9ae640a 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -485,8 +485,6 @@ public: virtual void ShowHint(const wxRect& rect); virtual void HideHint(); - void OnHintActivate(wxActivateEvent& event); - public: // deprecated -- please use SetManagedWindow() diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 133b34eb0c..e3ea6a1328 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -851,7 +851,14 @@ void wxAuiManager::UpdateHintWindowConfig() wxFRAME_NO_TASKBAR | wxNO_BORDER); #ifdef __WXMAC__ - m_hintWnd->Bind(wxEVT_ACTIVATE, &wxAuiManager::OnHintActivate, this); + // Do nothing so this event isn't handled in the base handlers. + + // Letting the hint window activate without this handler can lead to + // weird behaviour on Mac where the menu is switched out to the top + // window's menu in MDI applications when it shouldn't be. So since + // we don't want user interaction with the hint window anyway, we just + // prevent it from activating here. + m_hintWnd->Bind(wxEVT_ACTIVATE, [](wxActivateEvent&) {}); #endif m_hintWnd->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HOTLIGHT)); @@ -3414,18 +3421,6 @@ void wxAuiManager::HideHint() } } -void wxAuiManager::OnHintActivate(wxActivateEvent& WXUNUSED(event)) -{ - // Do nothing so this event isn't handled in the base handlers. - - // Letting the hint window activate without this handler can lead to - // weird behaviour on Mac where the menu is switched out to the top - // window's menu in MDI applications when it shouldn't be. So since - // we don't want user interaction with the hint window anyway, we just - // prevent it from activating here. -} - - void wxAuiManager::StartPaneDrag(wxWindow* pane_window, const wxPoint& offset)