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

Unified Diff: chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc

Issue 2927163002: wm: Do not resize when switching users if window is already maximized. (Closed)
Patch Set: Add a comment. Created 3 years, 6 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 | « chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc
diff --git a/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc b/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc
index c4935d7a3b700b6449410863c525d300836f1b69..7f1f8b789205ea8d01128c1bde7d330179e375cc 100644
--- a/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc
@@ -145,8 +145,10 @@ bool UserSwitchAnimatorChromeOS::CoversScreen(aura::Window* window) {
gfx::Rect bounds = window->GetBoundsInRootWindow();
gfx::Rect work_area =
display::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area();
- bounds.Intersect(work_area);
- return work_area == bounds;
+ // |work_area| may be on a different display, so we cannot just check the
+ // intersection of |work_area| and |bounds|, so just check if their sizes are
+ // equal to see if |bounds| covers |work_area|.
+ return work_area.size() == bounds.size();
Mr4D (OOO till 08-26) 2017/06/09 23:50:25 If you have a window which has the same size as ma
sammiequon 2017/06/10 00:04:49 I see, I *think* GetBoundsInScreen() would do.
}
void UserSwitchAnimatorChromeOS::AdvanceUserTransitionAnimation() {
« no previous file with comments | « chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698