From 8d5ebe639f3fc8c947dff4cf90070b5fc986bf84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Hamy?= Date: Fri, 19 Apr 2024 17:47:44 +0200 Subject: [PATCH] Maybe some hack to fix multiple monitors??? --- src/conveniences/pipeline.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/conveniences/pipeline.js b/src/conveniences/pipeline.js index f3099e75..fbd383ec 100644 --- a/src/conveniences/pipeline.js +++ b/src/conveniences/pipeline.js @@ -96,10 +96,20 @@ export const Pipeline = class Pipeline { this.pipelines_manager.disconnect(this._pipeline_destroyed_id); this._pipeline_changed_id = null; this._pipeline_destroyed_id = null; + + if (this.actor && this.actor._bms_notify_mapped_id) { + this.actor.disconnect(this.actor._bms_notify_mapped_id); + delete this.actor._bms_notify_mapped_id; + } } /// Attach a Pipeline object with `pipeline_id` already set to an actor. attach_pipeline_to_actor(actor) { + if (this.actor && this.actor._bms_notify_mapped_id) { + this.actor.disconnect(this.actor._bms_notify_mapped_id); + delete this.actor._bms_notify_mapped_id; + } + // set the actor this.actor = actor; if (!actor) @@ -117,6 +127,11 @@ export const Pipeline = class Pipeline { return; } + this.actor._bms_notify_mapped_id = this.actor.connect('notify::mapped', _ => { + if (this.actor.mapped && Main.layoutManager.monitors.length > 1) + setTimeout(_ => this.actor.queue_redraw(), 100); + }); + // update the effects this.update_effects_from_pipeline(pipeline); }