RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Previous|Next

  • Tickets
  • » Ticket #442

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.

  • Comment on, or change status of, this ticket

Previous|Next

Search tickets

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Options

  • Tickets
  • New ticket
  • Milestones
  • Subversion: Changesets
  • Subversion: Browse
  • CVS: Revisions
  • CVS: Browse
  • Search

RSS feeds Rss

  • Tickets
  • Everything!
  • More feeds...
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Collaboa theme is distantly based on the Collaboa default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Collaboa
This site runs on Rails

Hosted by Arachsys