mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
dnd: Handle dragActorSource getting destroyed
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2318>
This commit is contained in:
parent
628866f7d2
commit
de08ec915f
1 changed files with 9 additions and 0 deletions
|
|
@ -367,6 +367,10 @@ var _Draggable = class _Draggable extends Signals.EventEmitter {
|
|||
y = stageY - this._dragActor.height / 2;
|
||||
}
|
||||
this._dragActor.set_position(x, y);
|
||||
|
||||
this._dragActorSourceDestroyId = this._dragActorSource.connect('destroy', () => {
|
||||
this._dragActorSource = null;
|
||||
});
|
||||
} else {
|
||||
this._dragActorSource = this.actor;
|
||||
}
|
||||
|
|
@ -799,6 +803,11 @@ var _Draggable = class _Draggable extends Signals.EventEmitter {
|
|||
this._dragOrigParent = null;
|
||||
}
|
||||
|
||||
if (this._dragActorSource) {
|
||||
this._dragActorSource.disconnect(this._dragActorSourceDestroyId);
|
||||
this._dragActorSource = null;
|
||||
}
|
||||
|
||||
this._dragState = DragState.INIT;
|
||||
currentDraggable = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue