From d7542db38c4a2916c61fabee55faf10fcb287764 Mon Sep 17 00:00:00 2001 From: Zacharie DUBRULLE Date: Thu, 18 May 2023 11:40:32 +0000 Subject: [PATCH] dnd: Don't leak a signal connection The handler is currently leaked when a drag monitor stops a motion event. Part-of: --- js/ui/dnd.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/ui/dnd.js b/js/ui/dnd.js index c9bce01f5..53b4fde6c 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -590,6 +590,7 @@ var _Draggable = class _Draggable extends Signals.EventEmitter { let result = motionFunc(dragEvent); if (result != DragMotionResult.CONTINUE) { global.display.set_cursor(DRAG_CURSOR_MAP[result]); + dragEvent.targetActor.disconnect(targetActorDestroyHandlerId); return GLib.SOURCE_REMOVE; } }