Ticket #3721 (closed defect: fixed)
Cleanup radio widget's MSG_CURSOR
|Reported by:||mooffie||Owned by:||andrew_b|
|Branch state:||merged||Votes for changeset:||committed-master|
While investigating #3719 I discovered a "bug" in the radio widget:
Whenever a key is pressed (MSG_KEY), the widget draws itself to reflect the new state. But instead of doing this drawing explicitly, it does this indirectly by focusing the widget in its MSG_CURSOR. This is a vestige from the old days.
I'm attaching a bug to fix this.
Why is this a problem? Because:
- MSG_CURSOR has one defined purpose. It shouldn't be piggybacked for other things. This causes trouble:
- One way to fix #3719 is simply by adding "case MSG_FOCUS: r->pos = r->sel". This resets the active item to the selected one whenever the user moves the focus to the widget. But since MSG_FOCUS is outrageously sent in MSG_CURSOR also, this reset will be done after each key press, which means that the active item is stuck...
- Status changed from new to accepted
- Owner set to andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.19
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged