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

Unified Diff: chrome/app/chrome_exe_main_win.cc

Issue 2114503002: Enable Per-Monitor Support for Windows 10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@framefix
Patch Set: Add Comment Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698