Index: chrome/app/chrome_exe_main_win.cc |
diff --git a/chrome/app/chrome_exe_main_win.cc b/chrome/app/chrome_exe_main_win.cc |
index 86677bf87e7255515594a1417cf827e4257dc42f..845dcda706d5049b6733c48baff18ba047d351b5 100644 |
--- a/chrome/app/chrome_exe_main_win.cc |
+++ b/chrome/app/chrome_exe_main_win.cc |
@@ -127,7 +127,14 @@ BOOL SetProcessDPIAwareWrapper() { |
} |
void EnableHighDPISupport() { |
- if (!SetProcessDpiAwarenessWrapper(PROCESS_SYSTEM_DPI_AWARE)) { |
+ // Enable per-monitor DPI for Win10 or above instead of Win8.1 since Win8.1 |
+ // does not have EnableChildWindowDpiMessage, necessary for correct non-client |
+ // area scaling across monitors. |
+ PROCESS_DPI_AWARENESS process_dpi_awareness = |
+ base::win::GetVersion() >= base::win::VERSION_WIN10 |
+ ? PROCESS_PER_MONITOR_DPI_AWARE |
+ : PROCESS_SYSTEM_DPI_AWARE; |
+ if (!SetProcessDpiAwarenessWrapper(process_dpi_awareness)) { |
SetProcessDPIAwareWrapper(); |
} |
} |