overview: Use a MetaWindow argument in window-drag-* signals/API
It is quite weird to have those calls/signals using WindowClone as an argument, it is neater to pass MetaWindows around, and have each user deal with their own representations of these. https://bugzilla.gnome.org/show_bug.cgi?id=735972
This commit is contained in:
parent
b886656f61
commit
33e35f269f
@ -435,17 +435,17 @@ const Overview = new Lang.Class({
|
|||||||
this._inDrag = false;
|
this._inDrag = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
beginWindowDrag: function(clone) {
|
beginWindowDrag: function(window) {
|
||||||
this.emit('window-drag-begin', clone);
|
this.emit('window-drag-begin', window);
|
||||||
this._inDrag = true;
|
this._inDrag = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelledWindowDrag: function(clone) {
|
cancelledWindowDrag: function(window) {
|
||||||
this.emit('window-drag-cancelled', clone);
|
this.emit('window-drag-cancelled', window);
|
||||||
},
|
},
|
||||||
|
|
||||||
endWindowDrag: function(clone) {
|
endWindowDrag: function(window) {
|
||||||
this.emit('window-drag-end', clone);
|
this.emit('window-drag-end', window);
|
||||||
this._inDrag = false;
|
this._inDrag = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1818,16 +1818,16 @@ const Workspace = new Lang.Class({
|
|||||||
Lang.bind(this, this._onCloneSelected));
|
Lang.bind(this, this._onCloneSelected));
|
||||||
clone.connect('drag-begin',
|
clone.connect('drag-begin',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
Main.overview.beginWindowDrag(clone);
|
Main.overview.beginWindowDrag(clone.metaWindow);
|
||||||
overlay.hide();
|
overlay.hide();
|
||||||
}));
|
}));
|
||||||
clone.connect('drag-cancelled',
|
clone.connect('drag-cancelled',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
Main.overview.cancelledWindowDrag(clone);
|
Main.overview.cancelledWindowDrag(clone.metaWindow);
|
||||||
}));
|
}));
|
||||||
clone.connect('drag-end',
|
clone.connect('drag-end',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
Main.overview.endWindowDrag(clone);
|
Main.overview.endWindowDrag(clone.metaWindow);
|
||||||
overlay.show();
|
overlay.show();
|
||||||
}));
|
}));
|
||||||
clone.connect('size-changed',
|
clone.connect('size-changed',
|
||||||
|
@ -518,15 +518,15 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
clone.connect('drag-begin',
|
clone.connect('drag-begin',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
Main.overview.beginWindowDrag(clone);
|
Main.overview.beginWindowDrag(clone.metaWindow);
|
||||||
}));
|
}));
|
||||||
clone.connect('drag-cancelled',
|
clone.connect('drag-cancelled',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
Main.overview.cancelledWindowDrag(clone);
|
Main.overview.cancelledWindowDrag(clone.metaWindow);
|
||||||
}));
|
}));
|
||||||
clone.connect('drag-end',
|
clone.connect('drag-end',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
Main.overview.endWindowDrag(clone);
|
Main.overview.endWindowDrag(clone.metaWindow);
|
||||||
}));
|
}));
|
||||||
this._contents.add_actor(clone.actor);
|
this._contents.add_actor(clone.actor);
|
||||||
|
|
||||||
|
@ -63,9 +63,9 @@ const WorkspacesViewBase = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragBegin: function(overview, clone) {
|
_dragBegin: function(overview, window) {
|
||||||
this._inDrag = true;
|
this._inDrag = true;
|
||||||
this._setReservedSlot(clone.metaWindow);
|
this._setReservedSlot(window);
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragEnd: function() {
|
_dragEnd: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user