]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/containr.h
Document wxKill(wxSIGTERM) reliance on having an open window in wxMSW.
[wxWidgets.git] / include / wx / containr.h
index 3783578f402e669102012da114e5a143d30521f5..b465e33c30b5c8aec34f8e19a539211a4f79741d 100644 (file)
@@ -76,11 +76,13 @@ public:
     bool DoSetFocus();
 
     // returns whether we should accept focus ourselves or not
-    bool AcceptsFocus() const { return m_acceptsFocusSelf; }
+    bool AcceptsFocus() const
+        { return m_acceptsFocusSelf && m_winParent->CanBeFocused(); }
 
     // Returns whether we or one of our children accepts focus.
     bool AcceptsFocusRecursively() const
-        { return m_acceptsFocusSelf || m_acceptsFocusChildren; }
+        { return AcceptsFocus() ||
+            (m_acceptsFocusChildren && HasAnyChildrenAcceptingFocus()); }
 
     // We accept focus from keyboard if we accept it at all.
     bool AcceptsFocusFromKeyboard() const { return AcceptsFocusRecursively(); }
@@ -97,6 +99,10 @@ protected:
     // return true if we have any children accepting focus
     bool HasAnyFocusableChildren() const;
 
+    // return true if we have any children that do accept focus right now
+    bool HasAnyChildrenAcceptingFocus() const;
+
+
     // the parent window we manage the children for
     wxWindow *m_winParent;