[comp.windows.x] Losing Keybindings in XRN

ricks@shambhala.Berkeley.EDU (Rick L Spickelmier) (10/31/89)

XRN has the problem that right after popping up a dialog box (using
XtPopUp(popup, XtGrabExclusive)) and then popping down, all keybindings
in the application are lost.  This is dependent on the window manager
and the various WM options used.  For example, the keybindings are not
lost when running with no window manager, or with uwm, but they are
lost under GWM (unless you use the -i flag - don't set input focus) and
TWM (unless you have NoTitleFocus set).

The -i flag to GWM and the NoTitleFocus option to TWM inhibit the
following call:

	XSetInputFocus(dpy, window, RevertToPointerRoot, CurrentTime)

How could this affect the bindings...

Any ideas on why the window manager would steal the keybindings (or I
assume GRAB the keyboard events - the button events are still there)
and not give them back?


		Thanks,
			Rick Spickelmier
			UC Berkeley ricks@berkeley.edu

herbert@gr8ful.enet.dec.com (Kevin Paul Herbert) (11/01/89)

It sounds like input focus is being assigned to XRN's shell widget by
the window manager, which is just dropping the keypress events on the
floor. Since XRN normally relies on PointerRoot focus, it might break
when input focus gets set to something higher in the widget heirarchy
than the text widgets.

Try using XtSetKeyboardFocus(shell,widget) to cause the intrinsics to
re-direct your keypress events to whatever widget should be seeing them.

Kevin