Merge branch 'main' into virtualmonitor

This commit is contained in:
wheaney 2024-10-06 16:03:29 -07:00
commit 1b882d795a
2 changed files with 11 additions and 3 deletions

View File

@ -326,8 +326,11 @@ export const XREffect = GObject.registerClass({
constructor(params = {}) {
super(params);
this._is_display_distance_at_end = false;
this._distance_ease_timeline = null;
this.connect('notify::toggle-display-distance-start', this._handle_display_distance_properties_change.bind(this));
this.connect('notify::toggle-display-distance-end', this._handle_display_distance_properties_change.bind(this));
this.connect('notify::display-distance', this._handle_display_distance_properties_change.bind(this));
this._handle_display_distance_properties_change();
const calibrating = GdkPixbuf.Pixbuf.new_from_file(`${Globals.extension_dir}/textures/calibrating.png`);
this.calibratingImage = new Clutter.Image();
@ -340,6 +343,12 @@ export const XREffect = GObject.registerClass({
customBanner.width, customBanner.height, customBanner.rowstride);
}
_handle_display_distance_properties_change() {
const distance_from_end = Math.abs(this.display_distance - this.toggle_display_distance_end);
const distance_from_start = Math.abs(this.display_distance - this.toggle_display_distance_start);
this._is_display_distance_at_end = distance_from_end < distance_from_start;
}
_change_distance() {
if (this._distance_ease_timeline?.is_playing()) this._distance_ease_timeline.stop();
@ -353,7 +362,6 @@ export const XREffect = GObject.registerClass({
this._distance_ease_timeline.get_progress() *
(toggle_display_distance_target - this._distance_ease_start);
});
this._is_display_distance_at_end = !this._is_display_distance_at_end;
this._distance_ease_timeline.start();
}

@ -1 +1 @@
Subproject commit 5a7ddc2c18df268476dd123b9af84091e3bf49bb
Subproject commit d270ebfd2e3202133fea75e1513f1571960bdafd