overview: Allow dropping icons on windows
Currently the user has to find an empty spot in the workspace to be able to launcha new instance of an app using dnd. This is unnecessary hard, so just allow dropping on windows too. https://bugzilla.gnome.org/show_bug.cgi?id=652079
This commit is contained in:
parent
1309b64c33
commit
96dca48b3b
@ -308,6 +308,21 @@ WindowClone.prototype = {
|
|||||||
this.emit('drag-begin');
|
this.emit('drag-begin');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_getWorkspaceActor : function() {
|
||||||
|
let index = this.metaWindow.get_workspace().index();
|
||||||
|
return Main.overview.workspaces.getWorkspaceByIndex(index);
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDragOver : function(source, actor, x, y, time) {
|
||||||
|
let workspace = this._getWorkspaceActor();
|
||||||
|
return workspace.handleDragOver(source, actor, x, y, time);
|
||||||
|
},
|
||||||
|
|
||||||
|
acceptDrop : function(source, actor, x, y, time) {
|
||||||
|
let workspace = this._getWorkspaceActor();
|
||||||
|
workspace.acceptDrop(source, actor, x, y, time);
|
||||||
|
},
|
||||||
|
|
||||||
_onDragCancelled : function (draggable, time) {
|
_onDragCancelled : function (draggable, time) {
|
||||||
this.emit('drag-cancelled');
|
this.emit('drag-cancelled');
|
||||||
},
|
},
|
||||||
|
@ -149,6 +149,10 @@ WorkspacesView.prototype = {
|
|||||||
return this._workspaces[active];
|
return this._workspaces[active];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getWorkspaceByIndex: function(index) {
|
||||||
|
return this._workspaces[index];
|
||||||
|
},
|
||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
||||||
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
|
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
|
||||||
|
Loading…
Reference in New Issue
Block a user