On Tuesday 15 October 2002 12:52 pm, Andre Poenitz wrote:
> On Tue, Oct 15, 2002 at 12:41:46PM +0100, Angus Leeming wrote:
> > can you extract the info from ev->xbutton.state?
> >
> > man XButtonEvent:
> >  The state member is set to indicate the logical state of
> > the pointer buttons and modifier keys just prior to the
> > event, which is the bitwise inclusive OR of one or more of
> > the button or modifier key masks: But- ton1Mask,
> > Button2Mask, Button3Mask, Button4Mask, Button5Mask, Shift-
> > Mask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask,
> > Mod4Mask, and Mod5Mask.
>
> I think the current code tries exactly that and fails. The
> state is '0' for pure dragging.
>
> Andre'

I've read through the xforms source a little. 
Were I not /still/ compiling libqt, I'd try this out for you. As it is:

/home/aleem/xforms-1.0RC5.1/lib/textbox.c:    if (*ev == FL_PUSH && *key > FL_MBUTTON3)

FL_MBUTTON[1-5] may be of use to you here.

Alternatively try

        FL_Coord xx;
        FL_Coord yy;
        unsigned int keymask;

        fl_get_form_mouse(ob->form, &xx, &yy, &keymask);

>From the manual:
   Window fl_get_form_mouse(FL_FORM *form, FL_Coord *x, FL_Coord *y, 
                            unsigned *keymask)

   Window fl_get_win_mouse(Window win, FL_Coord *x, FL_Coord *y,
                           unsigned *keymask)

The functions return the window ID the mouse is in. Upon its return, x,y would be set 
to the the mouse position relative to the
form/window, and keymask contains information on modifier keys (same as the the 
corresponding XQueryPointer() argument).  

Reply via email to