Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: ash/common/wm/overview/window_selector.cc

Issue 2657453003: [ash-md] Makes sure that minimized windows can be activated in overview (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm/overview/window_selector.h ('k') | ash/common/wm/overview/window_selector_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/overview/window_selector.cc
diff --git a/ash/common/wm/overview/window_selector.cc b/ash/common/wm/overview/window_selector.cc
index 79647313037ec68212a70ade707ac6bfa217b4ba..5c7fb45104d4511d110a431ecf625c657c4d2f98 100644
--- a/ash/common/wm/overview/window_selector.cc
+++ b/ash/common/wm/overview/window_selector.cc
@@ -407,7 +407,8 @@ void WindowSelector::OnGridEmpty(WindowGrid* grid) {
CancelSelection();
}
-void WindowSelector::SelectWindow(WmWindow* window) {
+void WindowSelector::SelectWindow(WindowSelectorItem* item) {
+ WmWindow* window = item->GetWindow();
std::vector<WmWindow*> window_list =
WmShell::Get()->mru_window_tracker()->BuildMruWindowList();
if (!window_list.empty()) {
@@ -425,7 +426,7 @@ void WindowSelector::SelectWindow(WmWindow* window) {
1 + it - window_list.begin());
}
}
-
+ item->EnsureVisible();
window->GetWindowState()->Activate();
}
@@ -481,8 +482,7 @@ bool WindowSelector::HandleKeyEvent(views::Textfield* sender,
(num_key_presses_ * 100) / num_items_, 1, 300,
30);
WmShell::Get()->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW_ENTER_KEY);
- SelectWindow(
- grid_list_[selected_grid_index_]->SelectedWindow()->GetWindow());
+ SelectWindow(grid_list_[selected_grid_index_]->SelectedWindow());
break;
default:
// Not a key we are interested in, allow the textfield to handle it.
« no previous file with comments | « ash/common/wm/overview/window_selector.h ('k') | ash/common/wm/overview/window_selector_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698