]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/containr.cpp
add support for alpha in color dialog on OSX, see #14127
[wxWidgets.git] / src / common / containr.cpp
index ecc7570e708ac2886a6183a6188ad59d2ec94c3a..fbd3ea33d2bc7c1c3b0091bc11e79fa9b2650541 100644 (file)
@@ -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;