Commit 39ec034d authored by robliao's avatar robliao Committed by Commit bot

Change the Frame Calculation to Use GetSystemMetricsForHwnd

SM_CXSIZEFRAME from GetSystemMetrics is based off of the primary monitor's DPI.
GetSystemMetricsForHwnd accounts for the system metrics taking into account the
DPI of the HWND.

BUG=426656

Review-Url: https://codereview.chromium.org/2110323002
Cr-Commit-Position: refs/heads/master@{#403326}
parent c24619b2
...@@ -94,7 +94,9 @@ bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets( ...@@ -94,7 +94,9 @@ bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets(
// In fullscreen mode there is no frame. // In fullscreen mode there is no frame.
*insets = gfx::Insets(); *insets = gfx::Insets();
} else { } else {
const int frame_thickness = GetSystemMetrics(SM_CXSIZEFRAME); const int frame_thickness =
display::win::ScreenWin::GetSystemMetricsForHwnd(
GetHWND(), SM_CXSIZEFRAME);
// Reduce the Windows non-client border size because we extend the border // Reduce the Windows non-client border size because we extend the border
// into our client area in UpdateDWMFrame(). // into our client area in UpdateDWMFrame().
*insets = gfx::Insets(0, frame_thickness, frame_thickness, *insets = gfx::Insets(0, frame_thickness, frame_thickness,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment