walter@focsys.uucp (WalteR Steinemann) (09/07/90)
I have a problem of losing the keyboard focus with my cascaded popup Athena widgets (X11R3 (RISCwindows3.2 on a MIPS RS2030)). I have multiple popup windows some of which have text widgets for the user to enter text from the keyboard. The problems occurs when I popup (using XtPopup) a simple "Yes" "No" type window with XtGrabExclusive. I have the callbacks from the "Yes" and "No" button widgets doing the XtPopdown. These popups work by themselves but the seem to keep the Keyboard Focus. The Keyboard Focus does not return to the previous window (ie. the one with the text input fields). It seems to be worst if the pointer enters and leaves the window containing the buttons. By putting an explicit XtRemoveGrab call before my XtPopdown call I have managed to get one of text entry windows to get the Focus back 99% of the time. (I get some Toolkit warnings - I think are cause when XtPopdown does its XtRemoveGrab - because the widget is no longer on the grab list). But I have another text entry window which is popped up from one of the buttons in the first (it is Exclusive too) ... and once it loses the Focus it never gets it back. I have tried an XtSetKeyboardFocus before I popup this window but it doesn't help. I am running my application WITHOUT any window manager. I think that doing my XtPopdown from my callback is causing the problem. I have searched through all the X demo and contrib source code that we received but there are no good examples of handling the simple "Yes" "No" type popup windows with Athena widgets. Any pointers to good examples would be appreciated. If what am doing is the "right" thing - does it work better with other widgets (ie motif)? Please feel free to e-mail any suggestions. I'll post a summary if I get any good responses. -- WalteR -- -- Walter R. Steinemann -- Focus Automation Systems -- Waterloo, Ontario watmath!focsys!walter (519) 746-4918