Close WelcomeDialog instances before triggering NVDA Exit (#12957)
Fixes #12907
Summary of the issue:
NVDA crashes if the welcome dialog is open, and was opened via the NVDA menu.
Description of how this pull request fixes the issue:
Track instances of the welcome dialog as they are created, close them all before the exit dialog is triggers an exit.
As the cause of this problem is complicated, and a proper fix is risky, this small patch avoids touching the core module.
Testing strategy:
Manual testing:
Start NVDA, close any open dialogs
Open the Welcome Dialog via NVDA menu > Help
Exit NVDA (exiting NVDA methods)
Confirm the other way to start a Welcome Dialog exits correctly:
Start NVDA with the Welcome Dialog set to open on startup
Exit NVDA (exiting NVDA methods) with the Welcome Dialog still open
System tests have been added which test the issue for quitting from keyboard via the Exit Dialog