XForms: Bug in fl_get_button_numb()?

Jeff Pierce (piercej@preferred.com)
Fri, 17 Oct 1997 15:32:21 -0400

To subscribers of the xforms list from Jeff Pierce <piercej@preferred.com> :

I discovered a strange happening in XformCalc. I would attempt to get
the square root by clicking the right mouse button and I got the square
instead. Hmmmm. Looking at the code I found the author used
fl_get_button_numb(FL_OBJECT *ob) to decide which function to carry out.
That sounded ok. Maybe something was wrong with my mouse handler, two
button Microsof serial with X fvwm and Emulate3Button enabled. But, I
had never noticed this before on other prgrams.

I wrote a quick test program with one button and put
fl_get_button_numb() in the callback, simply printing out the button
number that was returned.

I discovered that "quick clicking" the right button caused a 0
(FL_LEFT_MOUSE) to be returned. Doing a slower click resulted in the
correct 3 (FL_RIGHT_MOUSE) to be returned.

I then added fl_mouse_button() to the callback and it returned the
correct number no matter how quick the click was. Even while
fl_get_button_numb returned an incorrect 0.

Anybody else see this problem?

Jeff Pierce, wd4nmq
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/