diff options
-rw-r--r-- | src/windows/native/sun/windows/awt_DesktopProperties.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/windows/native/sun/windows/awt_DesktopProperties.cpp b/src/windows/native/sun/windows/awt_DesktopProperties.cpp index 1df9abd567..b2271518d3 100644 --- a/src/windows/native/sun/windows/awt_DesktopProperties.cpp +++ b/src/windows/native/sun/windows/awt_DesktopProperties.cpp @@ -493,6 +493,16 @@ void CheckFontSmoothingSettings(HWND hWnd) { } } +BOOL ColorizationColorAffectsBorders() { + DWORD result = 0; + DWORD bufSize(sizeof(DWORD)); + HKEY hKey = NULL; + if (::RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\DWM"), 0, KEY_READ, &hKey) != ERROR_SUCCESS) return TRUE; + if (::RegQueryValueEx(hKey, _T("ColorPrevalence"), NULL, NULL, reinterpret_cast<LPBYTE>(&result), &bufSize) != ERROR_SUCCESS) return TRUE; + RegCloseKey(hKey); + return result == 0 ? FALSE : TRUE; +} + void AwtDesktopProperties::GetColorParameters() { SetColorProperty(TEXT("win.frame.activeCaptionGradientColor"), @@ -519,6 +529,7 @@ void AwtDesktopProperties::GetColorParameters() { // [tav] todo: listen WM_DWMCOLORIZATIONCOLORCHANGED DwmGetColorizationColor(&color, &opaque); SetColorProperty(TEXT("win.dwm.colorizationColor"), RGB(GetBValue(color), GetGValue(color), GetRValue(color))); + SetBooleanProperty(TEXT("win.dwm.colorizationColor.affects.borders"), ColorizationColorAffectsBorders()); } // ?? ?? ?? |