Gnats 5929: Re-Raise modal dialog to ensure that it is on top. Bug Number: 5929 Release notes (y/n): Yes For Release Nums: 7.2 There are two parts to this mechanism to ensure that an active modal dialog in RiverWare is not obscured by either other RiverWare dialogs or dialogs of another application. The first state could previously occur by raising some other dialog using the Windows Taskbar -- see the test sequence below. The Gnats 5929 problem was observed in RiverWare using Qt 5.5.1. This mechanism is enabled through this symbol in Q3GUI/Workspace.cpp: // Raise active MODAL DIALOG if it stops being the top window. [Gnats 5929] static const bool RE_RAISE_MODAL_DLG_FIX_ENABLED (true); // RW 7.2 (true) (1) On any 'applicationStateChanged' Qt signal AND any 'focusChanged' Qt signal from a widget in one dialog to a widget in a different dialog received from the QApplication singleton instance, if there is an active modal dialog, schedule the raising of that dialog (in 500 milliseconds). These are the relevant Qt signals, connected from the QApplication object: (a) QGuiApplication::applicationStateChanged (Qt::ApplicationState) [SIGNAL] (b) QApplication::focusChanged (QWidget* old, QWidget* now) [SIGNAL] ... those are processed in these Qt slog methods: (a) void Workspace::qAppl_applicationStateChanged (Qt::ApplicationState appState); (b) void Workspace::qAppl_focusChanged (QWidget* priorWid, QWidget* curWid); Other methods used in this 1st mechanism are: (c) void Workspace::reRaiseModalDlgFix_processWindowState(); (d) void Workspace::reRaiseModalDlgFix_raiseModalDialog(); (e) void Workspace::reRaiseModalDlgFix_SchedRaiseTimer(); (f) void Workspace::reRaiseModalDlgFix_CancelRaiseTimer(); (2) When there exists an active modal dialog (assessed during the 'focusChanged' processing mentioned above), run a REPEATING timer (triggered once a second) which raises an active modal dialog, if one exists, if that modal dialog is not also the currently active window. This 2nd mechanism was needed to raise RiverWare's obscured modal dialog when clicking in any other visible or partially-visible RiverWare dialog. This uses these methods: (g) void Workspace::reRaiseModalDlgFix_StartTick(); (h) void Workspace::reRaiseModalDlgFix_CancelTick(); (i) void Workspace::reRaiseModalDlgFix_modalDlgTick(); Test sequence identified by David in Gnats 5898 (a related bug): 1. Open RiverWare 2. Add a reservoir to the workspace 3. Run. It will abort. Leave the RiverWare Notice open. 4. On the Windows taskbar, hover over RiverWare and then Right-click on the Run Control. It will show that on top of the RiverWare Notice. 5. It then beeps if you click on anything else. 6. Click on the Windows taskbar and select any window (left mouse) and it does re-show the RiverWare Notice. ---