This issue is an important dilemma in user−interface design. If you are going to hard−code the position of a dialog on
the screen, you probably do not want to position the dialog at that location each time that it is popped up. Imagine that
you pop up a dialog, move it to an uncluttered area on your screen, interact with it for a while, and then pop it down. If
you use the dialog again, you would probably like it to reappear in the location where you put it previously. The best
way to handle this dilemma is to avoid doing any of your own dialog placement, with the possible exception of the
first time that a dialog is popped up.
Whether or not you want to position a dialog when it is displayed, you may still find it useful to be informed about
when a dialog is popped up or down. The XmNmapCallback is not the best tool for this purpose, since it is not
called each time the popped−up state of the dialog changes. The XmNpopupCallback and
XmNpopdownCallback callbacks are meant for this purpose. These resources are defined and implemented by X
Toolkit Intrinsics for all shell widgets. The XmNpopupCallback is invoked each time XtPopup() is called on a
shell widget, while the XmNpopdownCallback is called for XtPopdown().
People often get confused by the terminology of a dialog being popped down and a shell being iconified. Remember
that whether or not a shell is popped up is independent of its iconic state. Although a DialogShell cannot be iconified
separately, other shells can. These shells may ...