X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/974a12f86a2882b0999a441ce4ad07e0e2c4377c..e3ff35918924c912d7addb50f1ab9d7dea78216d:/src/common/combocmn.cpp diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 6139dfc179..7e53044b3e 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -732,6 +732,8 @@ void wxComboCtrlBase::Init() m_toplevEvtHandler = (wxEvtHandler*) NULL; #endif + m_mainCtrlWnd = this; + m_heightPopup = -1; m_widthMinPopup = -1; m_anchorSide = 0; @@ -1537,11 +1539,15 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event) if ( keycode == WXK_TAB ) { wxNavigationKeyEvent evt; + + wxWindow* mainCtrl = GetMainWindowOfCompositeControl(); + evt.SetFlags(wxNavigationKeyEvent::FromTab| (!event.ShiftDown() ? wxNavigationKeyEvent::IsForward : wxNavigationKeyEvent::IsBackward)); - evt.SetEventObject(this); - GetParent()->GetEventHandler()->AddPendingEvent(evt); + evt.SetEventObject(mainCtrl); + evt.SetCurrentFocus(mainCtrl); + mainCtrl->GetParent()->GetEventHandler()->AddPendingEvent(evt); return; } @@ -1574,8 +1580,10 @@ void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& event ) { if ( event.GetEventType() == wxEVT_SET_FOCUS ) { +#ifndef __WXMAC__ if ( m_text && m_text != ::wxWindow::FindFocus() ) m_text->SetFocus(); +#endif } Refresh(); @@ -1870,7 +1878,8 @@ void wxComboCtrlBase::ShowPopup() wxRect popupWinRect( popupX, popupY, szp.x, szp.y ); m_popup = popup; - if ( AnimateShow( popupWinRect, showFlags ) ) + if ( (m_iFlags & wxCC_IFLAG_DISABLE_POPUP_ANIM) || + AnimateShow( popupWinRect, showFlags ) ) { DoShowPopup( popupWinRect, showFlags ); }