Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Unblocking modal dialog
Ref. No. QNX.000009886
Category(ies) Development
Issue We have a modal dialog open and when the user clicks on a button, another modal dialog is brought up. When user is done with this dialog, it clicks done or cancel which causes all application windows to unblock.
This includes the first dialog, which was blocked and should stay blocked.

How do we solve this problem?



Solution When you create a modal dialog, 'B' from another modal dialog 'A', you know that all other windows are already blocked, so only dialog 'A' should be unblocked when dialog 'B' is unblocked.  Do not unblock anything else.

The alternative is to tack on something to 'user_data' of all things you block, keeping a block count.

When unblocking, decrement this counter, and when it goes to 0, unblock and change the cursor and cursor override of the widget into question.

You need to block the parent dialog of the new dialog and unblock its parent when the new dialog goes away.