dnd: Don't leak a signal connection

The handler is currently leaked when a drag monitor stops a
motion event.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2770>
(cherry picked from commit d7542db38c)
This commit is contained in:
Zacharie DUBRULLE 2023-05-18 11:40:32 +00:00 committed by Florian Müllner
parent 2dc00b9c0e
commit de2627d1e9

View file

@ -551,6 +551,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;
}
}