Fix WindowCloseReason Passed During System Shutdown by lindexi · Pull Request #19055 · AvaloniaUI/Avalonia (original) (raw)

What does the pull request do?

Fix #19027

What is the current behavior?

It can not pass the OSShutdown enum to WindowCloseReason of WindowClosingEventArgs.

What is the updated/expected behavior with this PR?

It can pass the OSShutdown enum to WindowCloseReason of WindowClosingEventArgs.

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

The WindowClosingEventArgs.CloseReason will change from WindowCloseReason.ApplicationShutdown to WindowCloseReason.OSShutdown when the System Shutdown.

Obsoletions / Deprecations

Fixed issues

Fix #19027