Disable forwarding the Escape event (#10697)

This commit is contained in:
DoctorNefario 2021-04-13 19:16:48 +10:00 committed by GitHub
parent 04101d23e7
commit 28e9f168d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -54,7 +54,7 @@ namespace ColorPicker.Helpers
}
}
public void EndUserSession()
public bool EndUserSession()
{
lock (_colorPickerVisibilityLock)
{
@ -70,7 +70,11 @@ namespace ColorPicker.Helpers
}
SessionEventHelper.End();
return true;
}
return false;
}
}

View File

@ -72,7 +72,7 @@ namespace ColorPicker.Keyboard
// ESC pressed
if (virtualCode == KeyInterop.VirtualKeyFromKey(Key.Escape))
{
_appStateHandler.EndUserSession();
e.Handled = _appStateHandler.EndUserSession();
return;
}