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

Side by Side Diff: ash/common/wm/overview/window_selector.cc

Issue 2338603002: Correctly restore fullscreen window bounds when leaving overview mode. (Closed)
Patch Set: Correctly restore fullscreen window bounds when leaving overview mode. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/wm/overview/window_selector.h" 5 #include "ash/common/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 532
533 void WindowSelector::OnDisplayAdded(const display::Display& display) {} 533 void WindowSelector::OnDisplayAdded(const display::Display& display) {}
534 534
535 void WindowSelector::OnDisplayRemoved(const display::Display& display) { 535 void WindowSelector::OnDisplayRemoved(const display::Display& display) {
536 // TODO(flackr): Keep window selection active on remaining displays. 536 // TODO(flackr): Keep window selection active on remaining displays.
537 CancelSelection(); 537 CancelSelection();
538 } 538 }
539 539
540 void WindowSelector::OnDisplayMetricsChanged(const display::Display& display, 540 void WindowSelector::OnDisplayMetricsChanged(const display::Display& display,
541 uint32_t metrics) { 541 uint32_t metrics) {
542 PositionWindows(/* animate */ false); 542 // If only the work area changes, there is no need to reposition windows in
543 RepositionTextFilterOnDisplayMetricsChange(); 543 // overview.
544 if (metrics != DISPLAY_METRIC_WORK_AREA) {
545 PositionWindows(/* animate */ false);
546 RepositionTextFilterOnDisplayMetricsChange();
547 }
544 } 548 }
545 549
546 void WindowSelector::OnWindowTreeChanged(WmWindow* window, 550 void WindowSelector::OnWindowTreeChanged(WmWindow* window,
547 const TreeChangeParams& params) { 551 const TreeChangeParams& params) {
548 // Only care about newly added children of |observed_windows_|. 552 // Only care about newly added children of |observed_windows_|.
549 if (!observed_windows_.count(window) || 553 if (!observed_windows_.count(window) ||
550 !observed_windows_.count(params.new_parent)) { 554 !observed_windows_.count(params.new_parent)) {
551 return; 555 return;
552 } 556 }
553 557
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 for (size_t i = 0; i <= grid_list_.size() && 699 for (size_t i = 0; i <= grid_list_.size() &&
696 grid_list_[selected_grid_index_]->Move(direction, animate); 700 grid_list_[selected_grid_index_]->Move(direction, animate);
697 i++) { 701 i++) {
698 selected_grid_index_ = 702 selected_grid_index_ =
699 (selected_grid_index_ + display_direction + grid_list_.size()) % 703 (selected_grid_index_ + display_direction + grid_list_.size()) %
700 grid_list_.size(); 704 grid_list_.size();
701 } 705 }
702 } 706 }
703 707
704 } // namespace ash 708 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698