mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 12:14:45 +13:00
Use CloseSequence on ENDSESSION
This commit is contained in:
parent
68cc98f9c1
commit
88d3670f91
1 changed files with 2 additions and 3 deletions
|
@ -302,7 +302,7 @@ protected override void WndProc(ref Message m)
|
|||
{
|
||||
if (m.Msg == (int)WindowsMessages.QUERYENDSESSION)
|
||||
{
|
||||
var reason = (EndSessionReasons)m.LParam;
|
||||
EndSessionReasons reason = (EndSessionReasons)m.LParam;
|
||||
if (reason.HasFlag(EndSessionReasons.ENDSESSION_CLOSEAPP))
|
||||
{
|
||||
// Register for restart. This allows our application to automatically restart when it is installing an update from the Store.
|
||||
|
@ -318,8 +318,7 @@ protected override void WndProc(ref Message m)
|
|||
{
|
||||
// If wParam is not equal to false (0), the application can be terminated at any moment after processing this message
|
||||
// thus should save its data while processing the message.
|
||||
SettingManager.SaveAllSettings();
|
||||
// CloseSequence();
|
||||
Program.CloseSequence();
|
||||
}
|
||||
m.Result = IntPtr.Zero; // "If an application processes this message, it should return zero."
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue