OpenXR on windows: OnApplicationFocus not called when system menu raised

,

Tested with a Rift S and unity 2022.2.11 using openxr on windows.

OnApplicationFocus (and OnApplicationPause) are not called when the VR system menu is up on windows (not in the editor or in a build). According to this official forum post, it should work:

When using oculus as the openxr provider, OnApplicationFocus is not run when the reserved system button is pressed. The input system can be used to capture the left menu button though.

When using steamvr as the openxr provider, OnApplicationFocus is not run when either the System or Menu button are pressed. Also, the input system can’t read either of those buttons in this scenario (by design) so there’s no intuitive Pause button in this setup.

There does not appear to be an OpenXRFeature to catch these system menu events.

Solution: OnApplicationFocus should be called whenever a system menu of any kind is raised or lowered in desktop openxr. This should include when the left oculus menu button is used with steamvr to raise the steam menu.

I also have this bug