From: Vadim Zeitlin Date: Fri, 3 Dec 2010 14:00:31 +0000 (+0000) Subject: Set the window in focus event sent by wxComboCtrl correctly. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/81ebc0419206ada0e32d9d8acd67940b93932855 Set the window in focus event sent by wxComboCtrl correctly. The window parameter wasn't copied correctly in the forwarded event. Fix this and avoid future problems of the same kind by using the copy ctor for creating the new event and then override the fields that we need to change from the original event instead of recreating the new event from bits and pieces of the original one. Closes #12741. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 15298838f0..e87b7df0d8 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -673,7 +673,8 @@ void wxComboBoxExtraInputHandler::OnFocus(wxFocusEvent& event) // wxEVT_SET_FOCUSes (since m_text->SetFocus is called // from combo's focus event handler), they should be quite // harmless. - wxFocusEvent evt2(event.GetEventType(),m_combo->GetId()); + wxFocusEvent evt2(event); + evt2.SetId(m_combo->GetId()); evt2.SetEventObject(m_combo); m_combo->GetEventHandler()->ProcessEvent(evt2);