dnd: Use Clutter.grab() for DnD grab

We still listen to an specific device or touch sequence, but we
don't grab it specifically.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
This commit is contained in:
Carlos Garnacho 2021-11-18 00:41:20 +01:00
parent bad385d15c
commit 5305bee94c

View File

@ -165,11 +165,7 @@ var _Draggable = class _Draggable {
}
_grabDevice(actor, pointer, touchSequence) {
if (touchSequence)
pointer.sequence_grab(touchSequence, actor);
else if (pointer)
pointer.grab(actor);
this._grab = global.stage.grab(actor);
this._grabbedDevice = pointer;
this._touchSequence = touchSequence;
@ -188,11 +184,10 @@ var _Draggable = class _Draggable {
this._capturedEventId = 0;
}
if (this._touchSequence)
this._grabbedDevice.sequence_ungrab(this._touchSequence);
else
this._grabbedDevice.ungrab();
if (this._grab) {
this._grab.dismiss();
this._grab = null;
}
this._touchSequence = null;
this._grabbedDevice = null;
}