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

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

Issue 2654153002: [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 3963265ca1f9ed5a3ee79ef88ae500c5960068e3..8b9c123c0fc605d5c6397762735ee517e4a74573 100644
--- a/ash/common/wm/overview/window_selector.cc
+++ b/ash/common/wm/overview/window_selector.cc
@@ -423,7 +423,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()) {
@@ -441,7 +442,7 @@ void WindowSelector::SelectWindow(WmWindow* window) {
1 + it - window_list.begin());
}
}
-
+ item->EnsureVisible();
window->GetWindowState()->Activate();
}
@@ -497,8 +498,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