I have an application which displays application modal dialogs. Based on my understanding of application modal dialogs, the user should be unable to interact with all windows owned by this application except the modal dialog. However, I`ve noticed that the user has the ability to interact with the Window Menu Button of the applications main window. What bothers me is the user has the ability to select the `Close` option at this time. And, indeed, my application exits. This is NOT desirable. Is my understanding of application modal incorrect or does X have a bug? Also, what can I do to work around this problem. I thought about disabling the `Close` option, but I really don`t want to do this. I still would like the user to be able to exit my application using the Window Menu Button. I thought about adding code the disable the `Close` option only when a modal dialog has been displayed. But, I`m not sure how to do this, and I displayed many modal dialogs, so this would be a lot of work.
Tue, 07/24/2012 - 11:11
#1
application modal dialogs
Try setting the property for modality on the Parent form as well as the dialog (shell).
NOTE I am calling the Parent form the form that would have the dialog (shell) as it`s parent.
C. Lamb
Try using a BulletinBoard dialog (XmCreateBulletinBoardDialog) and set the XmNdialogStyle to XmDIALOG_FULL_APPLICATION_MODAL (see XmBulletinBoard man page).
Modality is effectively a concept enforced by the window manager, specifically mwm, and it gets to define the implementation. In any case, you should be prepared for a premature exit.