st/oxr: Support FOCUSED to SYNCHRONIZED transfer in oxr_session_poll

This commit is contained in:
zhibinw 2022-08-03 20:11:14 +08:00 committed by Jakob Bornecrantz
parent 8e70290ec1
commit 601143bfb7

View file

@ -261,6 +261,14 @@ oxr_session_poll(struct oxr_logger *log, struct oxr_session *sess)
if (sess->state == XR_SESSION_STATE_VISIBLE && sess->compositor_focused) {
oxr_session_change_state(log, sess, XR_SESSION_STATE_FOCUSED);
}
if (sess->state == XR_SESSION_STATE_FOCUSED && !sess->compositor_focused) {
oxr_session_change_state(log, sess, XR_SESSION_STATE_VISIBLE);
}
if (sess->state == XR_SESSION_STATE_VISIBLE && !sess->compositor_visible) {
oxr_session_change_state(log, sess, XR_SESSION_STATE_SYNCHRONIZED);
}
}
static inline XrViewStateFlags