Commit 6a273d0f authored by Marc Durdin's avatar Marc Durdin
Browse files

fix(windows): shutdown fix masked modal result

Regression introduced in #7661 (17.0 alpha), #7825 (16.0 beta).

When shutting down CEF cleanly, we needed to pause the form destruction
sequence in order for CEF to complete its shutdown tasks. However, for
a dialog form, it will commonly be closed by setting `ModalResult` to a
non-zero value. In our fix, we inadvertently lost any `ModalResult`
value by calling `Close` after CEF was finished, which sets
`ModalResult` to `mrCancel` (value of 2).

This fix caches the `ModalResult` value, and if non-zero, uses it
instead after CEF shuts down, to achieve the same result.
parent aff995bd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment