X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e68b7b364aff19665e2c6ee8c68266b6f3d56355..ec2df34e27ba41f202ecbf096cdfed082a9ddb8f:/src/common/containr.cpp?ds=sidebyside diff --git a/src/common/containr.cpp b/src/common/containr.cpp index ecc7570e70..9de060cdda 100644 --- a/src/common/containr.cpp +++ b/src/common/containr.cpp @@ -54,7 +54,10 @@ bool wxControlContainerBase::UpdateCanFocusChildren() { m_acceptsFocusChildren = acceptsFocusChildren; - m_winParent->SetCanFocus(AcceptsFocusRecursively()); + // In the ports where it does something non trivial, the parent window + // should only be focusable if it doesn't have any focusable children + // (e.g. native focus handling in wxGTK totally breaks down otherwise). + m_winParent->SetCanFocus(m_acceptsFocusSelf && !m_acceptsFocusChildren); } return m_acceptsFocusChildren; @@ -184,7 +187,7 @@ void wxControlContainer::SetLastFocus(wxWindow *win) // within the same group. Used by wxSetFocusToChild on wxMSW // -------------------------------------------------------------------- -#if defined(__WXMSW__) && wxUSE_RADIOBTN +#if wxUSE_RADIOBTN wxRadioButton* wxGetPreviousButtonInGroup(wxRadioButton *btn) {