Re: XForms: fdesign wibnis

Richard Kent (
Fri, 6 Jun 1997 09:41:44 +0100

To subscribers of the xforms list from "Richard Kent" <> :

> keith tang wrote:
> > I find my applications will not receive keyboard input if the mouse
> > pointer is outside of the form boundries even though the form remains
> > selected. Is there an fl_ call to change this characteristic so the key
> > will still remain active with the mouse pointer positioned outside of
> > the form?


There is a response in the XForms archives which goes something like this !!

Hope this helps,



> My problem is, when the xform GUI is mapped and focused, and the
> user clicks outside the xform GIU, the other X app get focused,
> brought to the top, and the xform GUI is hidden behind the
> fullscreen X app.

You want to do a pointer grab. That will keep you events from
"leaking" to other applications or windows.

Here's a little bit of code that pops a window, grabs the pointer and
then releases it as soon a button is pressed.


XGrabPointer( fl_get_display(),
CurrentTime );


XUngrabPointer( fl_get_display(),
CurrentTime );

See the man pages for XGrabPointer() and XUngrabPointer() for more

Grabbing the pointer is considered somewhat "anti-social" X behavior
and should only be done in extraordinary circumstances.

Be advised: if your program should hang or otherwise fail to ungrab
the pointer, you will not be able to do anything on your display until
you kill the application from another terminal.

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: