diff options
author | Anton Tarasov <anton.tarasov@jetbrains.com> | 2019-04-11 13:18:12 +0300 |
---|---|---|
committer | Anton Tarasov <anton.tarasov@jetbrains.com> | 2019-04-11 13:18:12 +0300 |
commit | 549f1c107065eba763ac08dd90834b21980abdf5 (patch) | |
tree | 6c951f816f12aa6ad0808bbe5fa7f239d2784713 | |
parent | 6f4549c5b43e2f88b99d7dd58bbb660113607c99 (diff) | |
download | jdk8u_jdk-549f1c107065eba763ac08dd90834b21980abdf5.tar.gz |
IDEA-210154 Borderless UI: Top frame of IDEA window is bluejb8u202-b1543
-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()); } // ?? ?? ?? |