workspacesView: Don't use a drag monitor to get the clone
Just use the new variable passed to the signal.
This commit is contained in:
parent
8097cbbbe3
commit
7747f1c31d
@ -294,36 +294,18 @@ const WorkspacesView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragBegin: function() {
|
_dragBegin: function(overview, clone) {
|
||||||
if (this._scrolling)
|
if (this._scrolling)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._inDrag = true;
|
this._inDrag = true;
|
||||||
this._firstDragMotion = true;
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
|
this._workspaces[i].setReservedSlot(clone);
|
||||||
this._dragMonitor = {
|
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
||||||
dragMotion: Lang.bind(this, this._onDragMotion)
|
this._extraWorkspaces[i].setReservedSlot(clone);
|
||||||
};
|
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
|
||||||
},
|
|
||||||
|
|
||||||
_onDragMotion: function(dragEvent) {
|
|
||||||
if (Main.overview.animationInProgress)
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
|
||||||
|
|
||||||
if (this._firstDragMotion) {
|
|
||||||
this._firstDragMotion = false;
|
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
|
||||||
this._workspaces[i].setReservedSlot(dragEvent.dragActor._delegate);
|
|
||||||
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
|
||||||
this._extraWorkspaces[i].setReservedSlot(dragEvent.dragActor._delegate);
|
|
||||||
}
|
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragEnd: function() {
|
_dragEnd: function() {
|
||||||
DND.removeDragMonitor(this._dragMonitor);
|
|
||||||
this._inDrag = false;
|
this._inDrag = false;
|
||||||
|
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user