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

@ -401,7 +401,8 @@ function getRunDialog() {
* @window: the Meta.Window to activate
* @time: (optional) current event time
*
* Activates @window, switching to its workspace first if necessary
* Activates @window, switching to its workspace first if necessary,
* and switching out of the overview if it's currently active
*/
function activateWindow(window, time) {
let activeWorkspaceNum = global.screen.get_active_workspace_index();
@ -416,6 +417,8 @@ function activateWindow(window, time) {
} else {
window.activate(time);
}
overview.hide();
}
// TODO - replace this timeout with some system to guess when the user might