Fix T51959: Windows + Intel GPU offset between UI drawing and mouse.

Unfortunately this means disabling the code that ensures the title
bar is properly scaled with DPI, however better to have that as a
cosmetic issue than Blender being unusable with a lot of Intel GPUs.
This commit is contained in:
Brecht Van Lommel 2017-07-08 22:08:38 +02:00
parent 3361f2107b
commit 0584c5ba8e
Notes: blender-bot 2023-02-14 11:08:33 +01:00
Referenced by issue #67017, Incorrect Title Bar size when moving Window between monitors with different DPI and Scaling - Windows 10
Referenced by issue #51959, SurfacePro 4 + win10: Blank area at top. Mouse click off by blank area size.
1 changed files with 3 additions and 0 deletions

View File

@ -941,6 +941,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) {
// Tell Windows to automatically handle scaling of non-client areas
// such as the caption bar. EnableNonClientDpiScaling was introduced in Windows 10
@ -954,6 +956,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
}
}
}
#endif
GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (window) {