From 59655dcbc40dabc1a197275241ac7d3b9ccd92dd Mon Sep 17 00:00:00 2001 From: John Scipione Date: Mon, 12 Aug 2013 15:56:39 -0400 Subject: [PATCH] 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. --- src/kits/interface/ControlLook.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/ControlLook.cpp b/src/kits/interface/ControlLook.cpp index bd44d4fee9..3642300ed4 100644 --- a/src/kits/interface/ControlLook.cpp +++ b/src/kits/interface/ControlLook.cpp @@ -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;