Remove lens vector usage from Breezy GNOME when 6DoF position is provided

This commit is contained in:
wheaney 2025-12-21 13:47:44 -08:00
parent eae448cc14
commit 9cfb19284a
3 changed files with 18 additions and 10 deletions

View File

@ -229,6 +229,13 @@ export default class BreezyDesktopExtension extends Extension {
this._virtual_displays_overlay.set_position(targetMonitor.x, targetMonitor.y);
this._virtual_displays_overlay.set_size(targetMonitor.width, targetMonitor.height);
const state = this._read_state();
const pose_has_position = state['connected_device_pose_has_position'] === 'true';
Globals.logger.log_debug(
`connected_device_pose_has_position=${pose_has_position}`
);
Globals.data_stream.refresh_data();
this._virtual_displays_actor = new VirtualDisplaysActor({
width: targetMonitor.width,
@ -248,7 +255,8 @@ export default class BreezyDesktopExtension extends Extension {
framerate_cap: this.settings.get_double('framerate-cap'),
imu_snapshots: Globals.data_stream.imu_snapshots,
show_banner: Globals.data_stream.show_banner,
custom_banner_enabled: Globals.data_stream.custom_banner_enabled
custom_banner_enabled: Globals.data_stream.custom_banner_enabled,
pose_has_position
});
this._virtual_displays_overlay.set_child(this._virtual_displays_actor);

View File

@ -443,6 +443,13 @@ export const VirtualDisplaysActor = GObject.registerClass({
'Latest IMU quaternion snapshots and epoch timestamp for when it was collected',
GObject.ParamFlags.READWRITE
),
'pose-has-position': GObject.ParamSpec.boolean(
'pose-has-position',
'Pose Has Position',
'Whether the IMU snapshots contain pose data',
GObject.ParamFlags.READWRITE,
false
),
'curved-display': GObject.ParamSpec.boolean(
'curved-display',
'Curved Display',
@ -457,13 +464,6 @@ export const VirtualDisplaysActor = GObject.registerClass({
GObject.ParamFlags.READWRITE,
false
),
'smooth-follow-toggle-epoch-ms': GObject.ParamSpec.uint64(
'smooth-follow-toggle-epoch-ms',
'Smooth follow toggle epoch time',
'ms since epoch when smooth follow was toggled',
GObject.ParamFlags.READWRITE,
0, Number.MAX_SAFE_INTEGER, 0
),
'show-banner': GObject.ParamSpec.boolean(
'show-banner',
'Show banner',
@ -903,7 +903,7 @@ export const VirtualDisplaysActor = GObject.registerClass({
const viewportYBegin = this.headset_display_as_viewport_center ? targetMonitor.y : allDisplaysCenterYBegin;
this.fov_details = this._fov_details();
this.lens_vector = [0.0, 0.0, -this.fov_details.lensDistancePixels];
this.lens_vector = [0.0, 0.0, this.pose_has_position ? -this.fov_details.lensDistancePixels : 0.0];
this.monitor_placements = monitorsToPlacements(
this.fov_details,

@ -1 +1 @@
Subproject commit 975e5886e35147c5c2a77920e73576de8ba66a5d
Subproject commit 907032a68f8f872f02082dbaa4f0f82b440291c3