···11-// Copyright 2019-2022, Collabora, Ltd.
11+// Copyright 2019-2023, Collabora, Ltd.
22// SPDX-License-Identifier: BSL-1.0
33/*!
44 * @file
···3535struct xrt_tracking_factory;
3636struct xrt_builder;
3737struct xrt_system_devices;
3838+struct xrt_space_overseer;
3839struct os_hid_device;
39404041/*!
···182183 *
183184 * @param[in] xp Prober self parameter.
184185 * @param[out] out_xsysd Return of system devices, the pointed pointer must be NULL.
186186+ * @param[out] out_xso Return of the @ref xrt_space_overseer, the pointed pointer must be NULL.
185187 *
186188 * @note Code consuming this interface should use xrt_prober_create_system()
187189 */
188188- xrt_result_t (*create_system)(struct xrt_prober *xp, struct xrt_system_devices **out_xsysd);
190190+ xrt_result_t (*create_system)(struct xrt_prober *xp,
191191+ struct xrt_system_devices **out_xsysd,
192192+ struct xrt_space_overseer **out_xso);
189193190194 /*!
191195 * Iterate through drivers (by ID and auto-probers) checking to see if
···365369 * @public @memberof xrt_prober
366370 */
367371static inline xrt_result_t
368368-xrt_prober_create_system(struct xrt_prober *xp, struct xrt_system_devices **out_xsysd)
372372+xrt_prober_create_system(struct xrt_prober *xp,
373373+ struct xrt_system_devices **out_xsysd,
374374+ struct xrt_space_overseer **out_xso)
369375{
370370- return xp->create_system(xp, out_xsysd);
376376+ return xp->create_system(xp, out_xsysd, out_xso);
371377}
372378373379/*!
···578584 * @param[in] xp Prober
579585 * @param[in] config JSON config object if found for this setter upper.
580586 * @param[out] out_xsysd Return of system devices, the pointed pointer must be NULL.
587587+ * @param[out] out_xso Return of the @ref xrt_space_overseer, the pointed pointer must be NULL.
581588 *
582589 * @note Code consuming this interface should use xrt_builder_open_system()
583590 */
584591 xrt_result_t (*open_system)(struct xrt_builder *xb,
585592 cJSON *config,
586593 struct xrt_prober *xp,
587587- struct xrt_system_devices **out_xsysd);
594594+ struct xrt_system_devices **out_xsysd,
595595+ struct xrt_space_overseer **out_xso);
588596589597 /*!
590598 * Destroy this setter upper.
···621629xrt_builder_open_system(struct xrt_builder *xb,
622630 cJSON *config,
623631 struct xrt_prober *xp,
624624- struct xrt_system_devices **out_xsysd)
632632+ struct xrt_system_devices **out_xsysd,
633633+ struct xrt_space_overseer **out_xso)
625634{
626626- return xb->open_system(xb, config, xp, out_xsysd);
635635+ return xb->open_system(xb, config, xp, out_xsysd, out_xso);
627636}
628637629638/*!
+6-2
src/xrt/include/xrt/xrt_space.h
···120120 struct xrt_space **out_space);
121121122122 /*!
123123- * Create a space that wraps a device input pose, implicitly make the
124124- * device's tracking space the returned space parent.
123123+ * Create a space that wraps the @p xdev input pose described by input
124124+ * @p name, implicitly make the device's tracking space the parent of
125125+ * the created space. The name pose_space was chosen because while most
126126+ * input poses are part of the device, they may also be things tracked
127127+ * by the device. The important part is that the space is following the
128128+ * pose, that it happens to be attached to device is coincidental.
125129 *
126130 * @param[in] xso Owning space overseer.
127131 * @param[in] xdev Device to get the pose from.
···11-// Copyright 2018-2022, Collabora, Ltd.
11+// Copyright 2018-2023, Collabora, Ltd.
22// SPDX-License-Identifier: BSL-1.0
33/*!
44 * @file
···7070 u_hashset_destroy(&inst->action_sets.name_store);
7171 u_hashset_destroy(&inst->action_sets.loc_store);
72727373+ xrt_space_overseer_destroy(&inst->system.xso);
7374 xrt_system_devices_destroy(&inst->system.xsysd);
74757576#ifdef XRT_FEATURE_CLIENT_DEBUG_GUI
···267268268269 // Create the compositor if we are not headless.
269270 if (!inst->extensions.MND_headless) {
270270- xret = xrt_instance_create_system(inst->xinst, &sys->xsysd, &sys->xsysc);
271271+ xret = xrt_instance_create_system(inst->xinst, &sys->xsysd, &sys->xso, &sys->xsysc);
271272 } else {
272272- xret = xrt_instance_create_system(inst->xinst, &sys->xsysd, NULL);
273273+ xret = xrt_instance_create_system(inst->xinst, &sys->xsysd, &sys->xso, NULL);
273274 }
274275275276 if (xret != XRT_SUCCESS) {
+4
src/xrt/state_trackers/oxr/oxr_objects.h
···991010#pragma once
11111212+#include "xrt/xrt_space.h"
1213#include "xrt/xrt_limits.h"
1314#include "xrt/xrt_system.h"
1415#include "xrt/xrt_device.h"
···1295129612961297 //! System devices used in all session types.
12971298 struct xrt_system_devices *xsysd;
12991299+13001300+ //! Space overseer used in all session types.
13011301+ struct xrt_space_overseer *xso;
1298130212991303 //! System compositor, used to create session compositors.
13001304 struct xrt_system_compositor *xsysc;