Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[XForms] Unwanted behavior with radio buttons (with possible fix!)

0 views
Skip to first unread message

SBP

unread,
Oct 6, 2015, 11:29:18 PM10/6/15
to xforms-de...@nongnu.org
Hi all

I'm having the following unwanted behavior with xforms-1.2.4:

I have a set of three radio buttons on the same group, and I've set all
three buttons to respond only to left mouse clicks. After this, when I
right click on any of the two non-set buttons in the group, the one
that is set loses its color highlighting, yet keeps being set.

I think this is a bug, as it seems the non-set buttons are responding
to those right clicks, and are somehow stealing the highlighting
from the button that is set.

Looking at the source I have traced the issue to the file handling.c,
as it seems that fli_handle_form calls fli_do_radio_push whenever a
mouse button is pushed inside the form and over a radio button,
regardless of the mouse buttons active for the button. Thus,
fli_do_radio_push should be made to honor the active mouse buttons for
the radio button, however as do_shortcut calls fli_do_radio_push with a
left mouse push, if left mouse were to be disabled, shortcuts wouldn't
work.

I think two changes are in order. Modify fli_do_radio_push to honor the
active mouse buttons for the radio button being pushed, and modify the
way do_shortcut pushes a radio button. For the latter I propose adding
another possible value to the 'key' argument that corresponds to a
shortcut's push.

What do you think?

Cheers!

Sirius.

Jens Thoms Toerring

unread,
Oct 7, 2015, 10:03:08 AM10/7/15
to Development with and of XForms
Hello Sirius,

On Tue, Oct 06, 2015 at 10:28:51PM -0500, SBP wrote:
> I'm having the following unwanted behavior with xforms-1.2.4:
>
> I have a set of three radio buttons on the same group, and I've set all
> three buttons to respond only to left mouse clicks. After this, when I
> right click on any of the two non-set buttons in the group, the one
> that is set loses its color highlighting, yet keeps being set.
>
> I think this is a bug, as it seems the non-set buttons are responding
> to those right clicks, and are somehow stealing the highlighting
> from the button that is set.

Yes, definitely sounds like one:-(

> Looking at the source I have traced the issue to the file handling.c,
> as it seems that fli_handle_form calls fli_do_radio_push whenever a
> mouse button is pushed inside the form and over a radio button,
> regardless of the mouse buttons active for the button. Thus,
> fli_do_radio_push should be made to honor the active mouse buttons for
> the radio button, however as do_shortcut calls fli_do_radio_push with a
> left mouse push, if left mouse were to be disabled, shortcuts wouldn't
> work.
>
> I think two changes are in order. Modify fli_do_radio_push to honor the
> active mouse buttons for the radio button being pushed, and modify the
> way do_shortcut pushes a radio button. For the latter I propose adding
> another possible value to the 'key' argument that corresponds to a
> shortcut's push.
>
> What do you think?

Seems to be a sound analysis of the problem and of the ways to
solve it! Give me a bit of time to take a closer look. I guess a
new "stable" release is in order since a number of bugs have been
found and fixed. When I've got a bit more of time I'll do that!

Thank you and best regards, Jens
--
\ Jens Thoms Toerring ________ j...@toerring.de
\_______________________________ http://toerring.de

0 new messages