Update control focus flag. Fixes #9915

Parent window must be active for control to draw as focused. This
affects all controls that draw their focus ring using ControlLook
including but not limited to BButton, BCheckBox, and BRadioButton.

I won't pretend to know what is "right" but the behavior now matches
BeOS R5.
This commit is contained in:
John Scipione
2013-08-12 15:56:39 -04:00
parent 90b145cc39
commit 59655dcbc4
+3 -1
View File
@@ -87,8 +87,10 @@ BControlLook::Flags(BControl* control) const
if (!control->IsEnabled())
flags |= B_DISABLED;
if (control->IsFocus())
if (control->Window() != NULL && control->Window()->IsActive()
&& control->IsFocus()) {
flags |= B_FOCUSED;
}
if (control->Value() == B_CONTROL_ON)
flags |= B_ACTIVATED;