Ticket #442 (Fixed)Sun Nov 05 14:34:56 UTC 2017
Toolbox method Button_GetFlags can return an incorrect value
Reported by: | Fred Graute (114) | Severity: | Normal |
Part: | RISC OS: Module | Release: | |
Milestone: | Status | Fixed |
Details by Fred Graute (114):
The method Button_GetFlags doesn’t return the correct value when the button flags have been toggled with Button_SetFlags.
Button_GetFlags doesn’t read the flags using Wimp_GetIconState but returns an internal copy of the button flags. The internal flags however are not calculated correctly in Button_SetFlags at line 247:
https://www.riscosopen.org/viewer/view/castle/R…
It’s doing:
l->flags = (l->flags & ~w.clear_word) | (w.EOR_word & w.clear_word);Instead of:
l->flags = (l->flags & ~w.clear_word) ^ w.EOR_word;Possibly because earlier versions of the C compiler didn’t support the ^ operator.
The end result is that the internals flags do not match the actual button flags when flag bits are toggled. This may result in, say, the button’s selection state not being shown correctly.
Changelog:
Modified by Sprow (202) Wed, March 21 2018 - 21:16:26 GMT
- Status changed from Open to Fixed
Fixed in Window-1_79.