freemint / freemint

Unix-like kernel for Atari ST and compatible computers
https://freemint.github.io/freemint
Other
154 stars 34 forks source link

form_button on a RADIOBUTTON USERDEF redraws parent object as well #382

Open skaftetryne opened 3 weeks ago

skaftetryne commented 3 weeks ago

Noticing some strange behaviour when calling form_button on a RADIOBUTTON USERDEF. I'm using the USERDEFs from COPS' adaptrsc.c to display MagiC-style radiobuttons/checkbuttons/groupframes on AES'es that does not support these natively. When I test these under XaAES I see that not only the object itself but it's parent object and all it's siblings are redrawn by form_button. When the same button is not a USERDEF only it's sibling RADIOBUTTONs are drawn, as it should be.

Under TOS and MagiC only the RADIOBUTTON siblings are redrawn in all cases.

I can provide a test-program if anybody wants to take a look at it.

mikrosk commented 3 weeks ago

A test program never hurts, go ahead.

skaftetryne commented 3 weeks ago

Test program. udef.prg will use the USERDEF even under XaAES and will demonstrate this issue. It is especially noticable if the window is partially covered by another window when you operate the radiobuttons. Compare with no_udef.prg which does not suffer from the problem.

userdef_test.zip

With sources. The userdef is implemented in udef.c, which is a hacked version of adaptrsc.c from COPS.