[comp.windows.x] possible bug in Xt? X.V11 Release 3 on a Sun 3 running 3.4 OS

sundar@WHEATIES.AI.MIT.EDU (Sundar Narasimhan) (01/18/89)

Hi: 
I have an application that creates a shell and pops it up using code
that does something like:

    defaults_shell = XtCreatePopupShell("defaults", 
					topLevelShellWidgetClass,
					parent, NULL, 0);
    /* add a few widgets */
    XtRealizeWidget(defaults_shell);

This shell is popped up using 
    XtPopup(defaults_shell, XtGrabNone);
and popped down
    XtPopdown(defaults_shell);

I am running under "awm". When the shell is in the process of being
created (i.e. before the cursor changes to the left top corner cursor
as a prelude to rubber-banding) if I move the mouse out of the parent
window then the keyboard focus gets all messed up. (i.e. after the
pop up shell is created and displayed -- if I move the mouse back to
the parent, the parent does not get any keyboard events!! Enter and
Leave events however, continue to be delivered ok. I am pretty sure of
this since I've set up break points in these routines and know exactly
what is happening at the application level - the callback associated
with the keyboard events never gets entered).

However, if I leave the mouse within the parent while creating the
popup shell, everything works just fine -- keyboard focus continues to
follow the mouse with no problem.

I've spent hours tracking this problem down, so I'd be grateful if
anyone has any ideas as to why this is happening, and what fixes if
any, are required? Is there any better documentation on PopUp's and
how they are to be used other than what comes with the Xt documentation?

Thanks,
-Sundar