> 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?
Keith,
There is a response in the XForms archives which goes something like this !!
Hope this helps,
TicH
------------------------------------------------------------------------------
> 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.
fl_show_form(fd_try->try,FL_PLACE_CENTER,FL_NOBORDER,"try");
XGrabPointer( fl_get_display(),
fl_winget(),
True,
0,
GrabModeAsync,
GrabModeAsync,
None,
None,
CurrentTime );
fl_do_forms();
XUngrabPointer( fl_get_display(),
CurrentTime );
See the man pages for XGrabPointer() and XUngrabPointer() for more
details.
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
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/