Make workspace indicators drop targets

Allow dropping on the workspace indicators to open apps on specific workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=609913
This commit is contained in:
Adel Gadllah 2010-02-15 15:01:48 +01:00
parent 5ead0de7ca
commit a6df234528

View File

@ -699,6 +699,16 @@ SingleView.prototype = {
this._workspaces[i]._metaWorkspace.activate(global.get_current_time());
}));
actor._delegate = {};
actor._delegate.acceptDrop = Lang.bind(this, function(source, actor, x, y, time) {
if (this._workspaces[i].acceptDrop(source, actor, x, y, time)) {
this._workspaces[i]._metaWorkspace.activate(global.get_current_time());
return true;
}
else
return false;
});
actor.connect('scroll-event', Lang.bind(this, function(actor, event) {
let direction = event.get_scroll_direction();
let activeWorkspaceIndex = global.screen.get_active_workspace_index();