Main.activateWindow: always exit the overview if it's currently open

This way, clicking a message tray icon while the overview is open will
close the overview when activating its window.

Remove some other overview-related activation code which is now
redundant.

Also, remove calls to "global.get_current_time()" when calling
Main.activateWindow, since it's unnecessary (activateWindow will call
it itself if you don't pass in that arg).

https://bugzilla.gnome.org/show_bug.cgi?id=609765
This commit is contained in:
Dan Winship
2010-02-17 14:05:06 -05:00
parent 77fe0db623
commit cec62a7ca5
5 changed files with 12 additions and 37 deletions

View File

@ -163,27 +163,13 @@ GenericWorkspacesView.prototype = {
}
},
/**
* activateWindowFromOverview:
* @metaWindow: A #MetaWindow
* @time: Integer even timestamp
*
* This function exits the overview, switching to the given @metaWindow.
* If an application filter is in effect, it will be cleared.
*/
activateWindowFromOverview: function (metaWindow, time) {
if (this._windowSelectionAppId != null) {
this._clearApplicationWindowSelection(false);
}
Main.activateWindow(metaWindow, time);
Main.overview.hide();
},
hide: function() {
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
if (this._windowSelectionAppId != null)
this._clearApplicationWindowSelection(false);
activeWorkspace.actor.raise_top();
for (let w = 0; w < this._workspaces.length; w++)