Skip to content

Commit 6d49a3e

Browse files
committed
Disconnect notify signal for clone window object when switching workspace
1 parent 8cc376a commit 6d49a3e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/extension.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,14 @@ export default class RoundedWindowCorners extends Extension {
264264
shadow_clone.y = clone.y + frame_rect.y - actor.y - paddings
265265

266266
// Should works well work Desktop Cube extensions
267-
clone.connect (
267+
const notify_id = clone.connect (
268268
'notify::translation-z',
269269
() => (shadow_clone.translation_z = clone.translation_z - 0.05)
270270
)
271+
const destroy_id = clone.connect ('destroy', () => {
272+
clone.disconnect (notify_id)
273+
clone.disconnect (destroy_id)
274+
})
271275

272276
// Add reference shadow clone for clone actor, so that we
273277
// can restack position of shadow when we need

0 commit comments

Comments
 (0)