[comp.windows.x] Using XtDestroyWidget

shuang@caip.rutgers.edu (Shuang Chen) (06/03/90)

I just started to do X programming, so maybe this is a simple question
to you X experts.  I'd appreciate any helps.

The question is:  I want a window, say a top level widget and
its childen, removed corresponding to a button release.  I added a
procedure which uses XtDestroyWidget(toplevel) as a call back function
to button release. But when the button was pressed and released the 
window didn't get disappeared (though its childen stoped) until the
program finished. Where is the problem?  

Thanks in advance,

shuang