mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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:
parent
bad385d15c
commit
5305bee94c
1 changed files with 5 additions and 10 deletions
15
js/ui/dnd.js
15
js/ui/dnd.js
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue