Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2019-12-06 03:50:30 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-12-06 03:50:30 +0300
commit601eafd104ca66e3baaa45e9ecb00989395c55d9 (patch)
tree7e861ea4c75f9853b0e6fba212263cb8413ecc8e /intern
parent61a02a7aa1cabc504da3e5ca55f7e65d9b7aaf50 (diff)
Fix T72118: Enable Windows 10 Non-client DPI Scaling
Enables Windows 10 feature that automatically adjusts non-client area (title bar) on high-DPI displays. Differential Revision: https://developer.blender.org/D6370 Reviewed by Brecht Van Lommel
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 323722173d4..79e38de414f 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1156,9 +1156,8 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized");
if (hwnd) {
-#if 0
- // Disabled due to bug in Intel drivers, see T51959
- if (msg == WM_NCCREATE) {
+
+ if (msg == WM_NCCREATE) {
// Tell Windows to automatically handle scaling of non-client areas
// such as the caption bar. EnableNonClientDpiScaling was introduced in Windows 10
HMODULE m_user32 = ::LoadLibrary("User32.dll");
@@ -1166,13 +1165,11 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
GHOST_WIN32_EnableNonClientDpiScaling fpEnableNonClientDpiScaling =
(GHOST_WIN32_EnableNonClientDpiScaling)::GetProcAddress(m_user32,
"EnableNonClientDpiScaling");
-
if (fpEnableNonClientDpiScaling) {
fpEnableNonClientDpiScaling(hwnd);
}
}
}
-#endif
GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (window) {