]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/containr.cpp
Add missing WXK constants for the control keys
[wxWidgets.git] / src / common / containr.cpp
index 53d4e01348777bfa658d3272249241c11ed84f5d..ecc7570e708ac2886a6183a6188ad59d2ec94c3a 100644 (file)
 // wxControlContainerBase
 // ----------------------------------------------------------------------------
 
-void wxControlContainerBase::SetCanFocus(bool acceptsFocus)
+bool wxControlContainerBase::UpdateCanFocusChildren()
 {
-    if ( acceptsFocus == m_acceptsFocus )
-        return;
+    const bool acceptsFocusChildren = HasAnyFocusableChildren();
+    if ( acceptsFocusChildren != m_acceptsFocusChildren )
+    {
+        m_acceptsFocusChildren = acceptsFocusChildren;
 
-    m_acceptsFocus = acceptsFocus;
+        m_winParent->SetCanFocus(AcceptsFocusRecursively());
+    }
 
-    m_winParent->SetCanFocus(m_acceptsFocus);
+    return m_acceptsFocusChildren;
 }
 
 bool wxControlContainerBase::HasAnyFocusableChildren() const