[comp.windows.x.motif] XmText Widget Keyboard Focus

wds@uarthur.UUCP (William D. Sheppard) (01/10/91)

I have a problem with the XmText widget in the MULTI LINE
mode. The widget hierarchy is

	XmDialog
		XmForm
			XmLabel
			XmText
		XmForm
			XmLabel
			XmList
		XmForm
			XmDrawnButton
			XmDrawnButton
			XmDrawnButton
			XmDrawnButton


The problem occurs when Button1 is pushed in the
text window to set the insert cursor and begin
inserting text. This part works fine!
Now when I move the cursor into the list widget window
keyboard events in the list widget go into the text window
instead of the list widget (ie It appears that the text
widget has grabbed the keyboard and not released it).
Once this problem occurs I can never get keyboard events
in the list widget.

If I never push Button1 in the text widget, then I get
exactly what I expect. Text typed in the text widget window
goes into the text widget and keyboard events in the list
window are received by the list widget.

As near as I can tell the Motif action proc named "grab-focus"
which is the translation for <Btn1Down> is the culprit. Can
anyone enlighten me on how to get around this problem?

William Sheppard
World Bank, Washington DC