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>
This commit is contained in:
Zacharie DUBRULLE 2023-05-18 11:40:32 +00:00 committed by Florian Müllner
parent 4335c1a92a
commit d7542db38c

View File

@ -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;
}
}