mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
2 changed files with 19 additions and 0 deletions
|
|
@ -308,6 +308,21 @@ WindowClone.prototype = {
|
|||
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) {
|
||||
this.emit('drag-cancelled');
|
||||
},
|
||||
|
|
|
|||
|
|
@ -149,6 +149,10 @@ WorkspacesView.prototype = {
|
|||
return this._workspaces[active];
|
||||
},
|
||||
|
||||
getWorkspaceByIndex: function(index) {
|
||||
return this._workspaces[index];
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
||||
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue