Files
cef/patch/patches/win_screen_2980.patch
Marshall Greenblatt 364460420a Windows: Fix incorrect placement with GetInitialBounds (fixes issue #2980)
The coordinates passed to ScreenWin::GetDisplayMatching need to be converted
from DIP to screen coordinates.
2020-09-25 14:27:50 -04:00

16 lines
618 B
Diff

diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc
index d4fc53fd60d7..53c814534d44 100644
--- ui/display/win/screen_win.cc
+++ ui/display/win/screen_win.cc
@@ -728,7 +728,9 @@ Display ScreenWin::GetDisplayNearestPoint(const gfx::Point& point) const {
}
Display ScreenWin::GetDisplayMatching(const gfx::Rect& match_rect) const {
- return GetScreenWinDisplayNearestScreenRect(match_rect).display();
+ const gfx::Rect screen_rect = DIPToScreenRect(nullptr, match_rect);
+ return GetScreenWinDisplayNearestScreenRect(screen_rect).display();
+
}
Display ScreenWin::GetPrimaryDisplay() const {