XForms: which form the mouse is in?

Michal Szymanski (msz@bulge.astrouw.edu.pl)
Mon, 12 Jan 1998 12:11:00 +0100 (MET)

To subscribers of the xforms list from msz@bulge.astrouw.edu.pl (Michal Szymanski) :

Hi everybody,

I have a multi-form application and need to know programatically which
form the mouse pointer is in at a given moment. I tried to use some
XFORMS lib routines, but with no success. My platform is Solaris 2.5,
XForms 0.86, 0.88.

1. fl_get_form_mouse() returns window ID of the form which is given as the
first argument, EVEN IF the mouse is not in that form ;-((

2. fl_get_mouse() returns window ID which reflects the true position of
the mouse, BUT it is NOT the ID which is stored in FL_FORM structure
"window" parameter (and which is used/returned by fl_get_form_mouse()).
Instead, it gives the window ID which "xwininfo -children" utility
reports as the "parent" window of the forms' window. I could not find
any way to translate that "parent" ID to "forms" window ID, so I am
still unable to identify the form the window is in. "fl_win_to_form()"
invoked on the ID returned by "fl_get_mouse()" always gives NULL.

Any hints would be much appreciated. For future releases, I would vote
for a FL_FORMS' equivalent of FL_OBJECT's "belowmouse" flag. I guess
that XForms event dispatcher processes FL_ENTER/LEAVE events for each
form, anyway, so it should be easy to implement.

best regards,

Michal.

****************************************************************************
Michal Szymanski Internet: msz@sirius.astrouw.edu.pl
Warsaw University Observatory Bitnet: msz@plwauw61.bitnet
Al. Ujazdowskie 4 Voice: 48-22-6294011 ext 23
00-478 Warszawa, POLAND FAX: 48-22-6294967
****************************************************************************
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/