mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
dnd: Handle dragActorSource getting destroyed
(cherry picked from commit de08ec915f)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2705>
This commit is contained in:
parent
6f92a79d0d
commit
489a32f79a
1 changed files with 9 additions and 0 deletions
|
|
@ -365,6 +365,10 @@ var _Draggable = class _Draggable {
|
|||
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;
|
||||
}
|
||||
|
|
@ -797,6 +801,11 @@ var _Draggable = class _Draggable {
|
|||
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