For locking a client application (after some time of user inactivity) I do popup a application modal dialog (Dialog class) which prevents all other user inputs and forces authentication which works just fine.
There is one problem with this approach. In case another modal dialog is triggered it is shown on top, steals the focus and so bypasses the locking mechanism.
Is there any approach to prevent additional modal dialogs to take control and leave the input to the "one and only master dialog"?