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

Unified Diff: ui/display/screen_base.cc

Issue 2730413002: Moves FindDisplayIndexContainingPoint into display (Closed)
Patch Set: cleanup Created 3 years, 9 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 | « ui/display/manager/display_manager_utilities.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/screen_base.cc
diff --git a/ui/display/screen_base.cc b/ui/display/screen_base.cc
index 21c8c270f2c21cbf3d29c3f9ef696dceb51e5fd3..297f9108958d827bb1a1c6e3c142e4092c75037d 100644
--- a/ui/display/screen_base.cc
+++ b/ui/display/screen_base.cc
@@ -58,6 +58,9 @@ const std::vector<Display>& ScreenBase::GetAllDisplays() const {
}
Display ScreenBase::GetDisplayMatching(const gfx::Rect& match_rect) const {
+ if (match_rect.IsEmpty())
+ return GetDisplayNearestPoint(match_rect.origin());
+
const Display* match =
FindDisplayWithBiggestIntersection(display_list_.displays(), match_rect);
return match ? *match : GetPrimaryDisplay();
« no previous file with comments | « ui/display/manager/display_manager_utilities.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698