diff --git a/doc/changes/state_trackers/mr.759.md b/doc/changes/state_trackers/mr.759.md new file mode 100644 index 000000000..99e93a37f --- /dev/null +++ b/doc/changes/state_trackers/mr.759.md @@ -0,0 +1,2 @@ +OpenXR: Use new multi compositor controls to set visibility and z_order if +available. This is needed for when we are not in service mode. diff --git a/src/xrt/state_trackers/oxr/oxr_session.c b/src/xrt/state_trackers/oxr/oxr_session.c index feada092a..8378e8d65 100644 --- a/src/xrt/state_trackers/oxr/oxr_session.c +++ b/src/xrt/state_trackers/oxr/oxr_session.c @@ -1977,6 +1977,10 @@ oxr_session_destroy(struct oxr_logger *log, struct oxr_handle_base *hb) return oxr_error((LOG), XR_ERROR_RUNTIME_FAILURE, "Failed to create native compositor! '%i'", \ xret); \ } \ + if ((SESS)->sys->xsysc->xmcc != NULL) { \ + xrt_syscomp_set_state((SESS)->sys->xsysc, &(SESS)->xcn->base, true, true); \ + xrt_syscomp_set_z_order((SESS)->sys->xsysc, &(SESS)->xcn->base, 0); \ + } \ } while (false) #define OXR_SESSION_ALLOCATE(LOG, SYS, OUT) \