[gnome-shell/wip/workspace: 9/9] workspacesView: Don't use a drag monitor to get the clone
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/workspace: 9/9] workspacesView: Don't use a drag monitor to get the clone
- Date: Wed, 11 Sep 2013 19:05:13 +0000 (UTC)
commit b62c76ed85c9fdb89b79a95feac09c66bacaab55
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Sep 11 13:35:17 2013 -0400
workspacesView: Don't use a drag monitor to get the clone
Just use the new variable passed to the signal.
js/ui/workspacesView.js | 24 +++---------------------
1 files changed, 3 insertions(+), 21 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index a343973..df2a505 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -269,34 +269,16 @@ const WorkspacesView = new Lang.Class({
}
},
- _dragBegin: function() {
+ _dragBegin: function(clone) {
if (this._scrolling)
return;
this._inDrag = true;
- this._firstDragMotion = true;
-
- this._dragMonitor = {
- dragMotion: Lang.bind(this, this._onDragMotion)
- };
- 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);
- }
-
- return DND.DragMotionResult.CONTINUE;
+ for (let i = 0; i < this._workspaces.length; i++)
+ this._workspaces[i].setReservedSlot(clone);
},
_dragEnd: function() {
- DND.removeDragMonitor(this._dragMonitor);
this._inDrag = false;
for (let i = 0; i < this._workspaces.length; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]