From 6d49a3ee7f10eec59886932ec459668b9820f059 Mon Sep 17 00:00:00 2001 From: Yi <32430186+yilozt@users.noreply.github.com> Date: Sun, 12 Nov 2023 16:08:52 +0800 Subject: [PATCH] Disconnect notify signal for clone window object when switching workspace --- src/extension.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 550ae74..bde7985 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -264,10 +264,14 @@ export default class RoundedWindowCorners extends Extension { shadow_clone.y = clone.y + frame_rect.y - actor.y - paddings // Should works well work Desktop Cube extensions - clone.connect ( + const notify_id = clone.connect ( 'notify::translation-z', () => (shadow_clone.translation_z = clone.translation_z - 0.05) ) + const destroy_id = clone.connect ('destroy', () => { + clone.disconnect (notify_id) + clone.disconnect (destroy_id) + }) // Add reference shadow clone for clone actor, so that we // can restack position of shadow when we need