mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-17 04:15:44 +00:00
st/oxr: If the app called request-exit, go to exiting instead of ready.
This commit is contained in:
parent
6b99e2fbdc
commit
939c41aba9
|
@ -933,6 +933,7 @@ struct oxr_session
|
|||
|
||||
XrSessionState state;
|
||||
bool frame_started;
|
||||
bool exiting;
|
||||
|
||||
struct u_hashmap_int *act_sets;
|
||||
struct u_hashmap_int *sources;
|
||||
|
|
|
@ -145,8 +145,11 @@ oxr_session_end(struct oxr_logger *log, struct oxr_session *sess)
|
|||
}
|
||||
|
||||
oxr_session_change_state(log, sess, XR_SESSION_STATE_IDLE);
|
||||
oxr_session_change_state(log, sess, XR_SESSION_STATE_READY);
|
||||
|
||||
if (sess->exiting) {
|
||||
oxr_session_change_state(log, sess, XR_SESSION_STATE_EXITING);
|
||||
} else {
|
||||
oxr_session_change_state(log, sess, XR_SESSION_STATE_READY);
|
||||
}
|
||||
return oxr_session_success_result(sess);
|
||||
}
|
||||
|
||||
|
@ -166,6 +169,7 @@ oxr_session_request_exit(struct oxr_logger *log, struct oxr_session *sess)
|
|||
}
|
||||
//! @todo start fading out the app.
|
||||
oxr_session_change_state(log, sess, XR_SESSION_STATE_STOPPING);
|
||||
sess->exiting = true;
|
||||
return oxr_session_success_result(sess);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue