Make the workspace added on the middle mouse button click active

This ensures that we launch the new instance of an application on the newly
added workspace in the grid view, in which we don't make the newly added
workspace active by default.

https://bugzilla.gnome.org/show_bug.cgi?id=591645
This commit is contained in:
Marina Zhurakhinskaya 2010-05-12 15:19:40 -04:00
parent 47a92e7fc0
commit ec6bc8f216
2 changed files with 4 additions and 2 deletions

View File

@ -458,7 +458,8 @@ AppWellIcon.prototype = {
if (button == 1) {
this._onActivate(event);
} else if (button == 2) {
Main.overview.workspaces.addWorkspace();
let newWorkspace = Main.overview.workspaces.addWorkspace();
newWorkspace.activate(global.get_current_time());
this.emit('launching');
this.app.open_new_window();
Main.overview.hide();

View File

@ -445,7 +445,7 @@ MosaicView.prototype = {
},
addWorkspace: function() {
global.screen.append_new_workspace(false, global.get_current_time());
return global.screen.append_new_workspace(false, global.get_current_time());
},
canRemoveWorkspace: function() {
@ -1395,6 +1395,7 @@ SingleView.prototype = {
let ws = global.screen.append_new_workspace(false,
global.get_current_time());
ws.activate(global.get_current_time());
return ws;
},
removeWorkspace: function() {