AnyOldName3 / modorganizer-installer_omod

OMOD installer using https://github.com/erri120/OMODFramework
GNU General Public License v3.0
2 stars 3 forks source link

Modality problems #4

Open AnyOldName3 opened 4 years ago

AnyOldName3 commented 4 years ago

Currently, all installer_omod popups except the readme are application-modal. Custom WinForms widgets created by C# OMODs, like DarNified UI, are thread-modal. The readme is non-modal. This imposes the following problems:

https://github.com/AnyOldName3/modorganizer-installer_omod/pull/3 changes the RtfPopup to a QMainWindow instead of QDialog. This separates it from the main window's window hierarchy so it's not locked out. The issues then become:

For the DarNified UI popups, I don't know if we can do anything. We need to run the install script on a separate thread otherwise the extraction process will lock up the UI and we can't have a progress bar, and we have no control over the windows it creates. The only thing I can think of is having a Mod Organizer is locked while OMOD installer is running popup akin to when an application is running via the VFS, but I don't know if that would fight our other popups.

Qt's modality documentation isn't super-clear as I don't think they anticipated the readme popup use case. I believe that non-modal does what it sounds like, application-modal steals input from all Qt-managed windows in the application, and window-modal steals input from:

It might just be simpler to pass the generated HTML for the readme to the browser so it's totally out of MO2's hands.