CanAcceptFocus() now returns true if either the window itself or one of its children accepts focus; added new IsFocusable() to test whether the window itself accepts focus

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-06-28 12:04:06 +00:00
parent 4e21a649f0
commit edc0987174
6 changed files with 52 additions and 27 deletions

View File

@@ -2742,7 +2742,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
// problems, so don't do it for them (unnecessary anyhow)
if ( !win->IsOfStandardClass() )
{
if ( message == WM_LBUTTONDOWN && win->CanAcceptFocus() )
if ( message == WM_LBUTTONDOWN && win->IsFocusable() )
win->SetFocus();
}
}