Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9915 closed bug (fixed)

BButton focus behaves differently from others

Reported by: ttcoder Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


A very very very minor "bug" in hrev45824 :

If a window loses focus/is deactivated (e.g. pushed to back), the CurrentFocus() view in that window will redraw itself without the blue line, and redraw it back when the window gets active again. This was true for all BControls in BeOS.

The bug is that... in Haiku this is true for all except BButton. At first, it seems BButton::Draw() makes the decision to draw the line only based on BView::IsFocus() but forgets to also check Window()->IsActive(), so that would be easy to fix, just add the missing check.

But looking at its Draw() and WindowActivated() it seems everything is in order. Maybe the problem is in BControlLook (but if so then why are the other bcontrols not affected?).

Change History (2)

comment:1 by jscipione, 7 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev45963. Checked R5 and you are right: controls are only draw as focused when their parent window is active. This bug affected all controls that used BControlLook to draw their focus ring including BButton, BCheckBox, and BRadioButton.

comment:2 by ttcoder, 7 years ago

Thanks John, and good catch.. I was so focused on the one app I was working on (which uses BMenuField, BListView, BTextControl but not checkboxes or radio buttons) that I believed it was "all" controls that were affected. Anyway. Now they all agree and everything is consistent. I like consistent. *g*

Note: See TracTickets for help on using tickets.