Remove AcceptsFocus() check from SetFocus()

This is partially a workaround for AcceptsFocus() not working as
expected for hidden windows under Mac (see the upcoming commits), but
also makes sense on its own: the other ports don't check whether the
window accepts focus in their SetFocus() implementation and it's not
clear why should Mac do this.

See #17340.
This commit is contained in:
Vadim Zeitlin
2019-10-27 01:18:27 +02:00
parent 55da22563b
commit c9faa30987

View File

@@ -578,9 +578,6 @@ static bool wxIsWindowOrParentDisabled(wxWindow* w)
void wxWindowMac::SetFocus()
{
if ( !AcceptsFocus() )
return ;
if (wxIsWindowOrParentDisabled((wxWindow*) this))
return;