appDisplay: Don't leave overview for drag&drop of an app
The design says we stay in the overview for these situations.
This commit is contained in:
parent
2dcd0511c4
commit
9f5a5ad635
@ -528,24 +528,24 @@ WellDisplayItem.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_handleActivate: function () {
|
_handleActivate: function () {
|
||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0) {
|
||||||
this.launch();
|
this.appInfo.launch();
|
||||||
else {
|
Main.overview.hide();
|
||||||
|
} else {
|
||||||
/* Pick the first window and activate it;
|
/* Pick the first window and activate it;
|
||||||
* In the future, we want to have a menu dropdown here. */
|
* In the future, we want to have a menu dropdown here. */
|
||||||
let first = this._windows[0];
|
let first = this._windows[0];
|
||||||
Main.overview.activateWindow(first, Clutter.get_current_event_time());
|
Main.overview.activateWindow(first, Clutter.get_current_event_time());
|
||||||
}
|
}
|
||||||
this.emit('activated');
|
|
||||||
},
|
|
||||||
|
|
||||||
// Opens an application represented by this display item.
|
|
||||||
launch : function() {
|
|
||||||
this.appInfo.launch();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
shellWorkspaceLaunch : function() {
|
shellWorkspaceLaunch : function() {
|
||||||
this.launch();
|
if (this._windows.length == 0) {
|
||||||
|
this.appInfo.launch();
|
||||||
|
} else {
|
||||||
|
// We should open a new window for the app here, once we know
|
||||||
|
// how to do that.
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getDragActor: function(stageX, stageY) {
|
getDragActor: function(stageX, stageY) {
|
||||||
@ -563,8 +563,6 @@ WellDisplayItem.prototype = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Signals.addSignalMethods(WellDisplayItem.prototype);
|
|
||||||
|
|
||||||
function WellGrid() {
|
function WellGrid() {
|
||||||
this._init();
|
this._init();
|
||||||
}
|
}
|
||||||
@ -818,9 +816,6 @@ AppWell.prototype = {
|
|||||||
for (let i = 0; i < apps.length; i++) {
|
for (let i = 0; i < apps.length; i++) {
|
||||||
let app = apps[i];
|
let app = apps[i];
|
||||||
let display = new WellDisplayItem(app, this.isFavorite);
|
let display = new WellDisplayItem(app, this.isFavorite);
|
||||||
display.connect('activated', Lang.bind(this, function (display) {
|
|
||||||
Main.overview.hide();
|
|
||||||
}));
|
|
||||||
this._grid.actor.add_actor(display.actor);
|
this._grid.actor.add_actor(display.actor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user