A few tweaks
This commit is contained in:
parent
12eecc591f
commit
524900be0f
|
|
@ -26,14 +26,6 @@ export default class BreezyDesktopExtension extends Extension {
|
|||
|
||||
this.settings = this.getSettings();
|
||||
|
||||
this.settings.connect('changed::effect-enable', () => {
|
||||
if (this.settings.get_boolean('effect-enable')) {
|
||||
this.enable();
|
||||
} else {
|
||||
this.disable();
|
||||
}
|
||||
});
|
||||
|
||||
// Set/destroyed by enable/disable
|
||||
this._cursor_manager = null;
|
||||
this._monitor_manager = null;
|
||||
|
|
@ -145,6 +137,7 @@ export default class BreezyDesktopExtension extends Extension {
|
|||
toggle_display_distance_end: this.settings.get_double('toggle-display-distance-end'),
|
||||
});
|
||||
|
||||
this.settings.bind('effect-enable', this._xr_effect, 'effect-enable', Gio.SettingsBindFlags.DEFAULT)
|
||||
this.settings.bind('display-distance', this._xr_effect, 'display-distance', Gio.SettingsBindFlags.DEFAULT)
|
||||
this.settings.bind('toggle-display-distance-start', this._xr_effect, 'toggle-display-distance-start', Gio.SettingsBindFlags.DEFAULT)
|
||||
this.settings.bind('toggle-display-distance-end', this._xr_effect, 'toggle-display-distance-end', Gio.SettingsBindFlags.DEFAULT)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ function setIntermittentUniformVariables() {
|
|||
const validKeepalive = Math.abs(toSec(currentDateMS) - toSec(imuDateMS)) < 5;
|
||||
const imuData = dataViewFloatArray(dataView, IMU_QUAT_DATA);
|
||||
const imuResetState = imuData[0] === 0.0 && imuData[1] === 0.0 && imuData[2] === 0.0 && imuData[3] === 1.0;
|
||||
const enabled = dataViewUint8(dataView, ENABLED) !== 0 && version === DATA_LAYOUT_VERSION && validKeepalive && !imuResetState;
|
||||
const enabled = this.effect_enable && dataViewUint8(dataView, ENABLED) !== 0 && version === DATA_LAYOUT_VERSION && validKeepalive && !imuResetState;
|
||||
|
||||
if (enabled) {
|
||||
const displayRes = dataViewUintArray(dataView, DISPLAY_RES);
|
||||
|
|
@ -169,6 +169,13 @@ function setIntermittentUniformVariables() {
|
|||
|
||||
export const XREffect = GObject.registerClass({
|
||||
Properties: {
|
||||
'effect-enable': GObject.ParamSpec.boolean(
|
||||
'effect-enable',
|
||||
'Effect enable',
|
||||
'Whether this effect is enabled',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
true
|
||||
),
|
||||
'target-monitor': GObject.ParamSpec.jsobject(
|
||||
'target-monitor',
|
||||
'Target Monitor',
|
||||
|
|
|
|||
|
|
@ -12,17 +12,12 @@
|
|||
<object class="AdwStatusPage" id="no-connected-device">
|
||||
<property name="title" translatable="true">No device connected</property>
|
||||
<property name="description" translatable="true">Breezy Desktop was unable to detect any supported XR devices.</property>
|
||||
<property name="icon-name">network-disconnected-symbolic</property>
|
||||
<property name="width-request">650</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="connected-device-info">
|
||||
<property name="column-spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">horizontal-arrows-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="connected-device-label">
|
||||
<property name="label">VITURE One</property>
|
||||
|
|
|
|||
Loading…
Reference in New Issue