Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemWin32.cpp
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| bool eventHandled = false; | bool eventHandled = false; | ||||
| LRESULT lResult = 0; | LRESULT lResult = 0; | ||||
| GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem(); | GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem(); | ||||
| GHOST_EventManager *eventManager = system->getEventManager(); | GHOST_EventManager *eventManager = system->getEventManager(); | ||||
| GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized"); | GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized"); | ||||
| if (hwnd) { | 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 | // Tell Windows to automatically handle scaling of non-client areas | ||||
| // such as the caption bar. EnableNonClientDpiScaling was introduced in Windows 10 | // such as the caption bar. EnableNonClientDpiScaling was introduced in Windows 10 | ||||
| HMODULE m_user32 = ::LoadLibrary("User32.dll"); | HMODULE m_user32 = ::LoadLibrary("User32.dll"); | ||||
| if (m_user32) { | if (m_user32) { | ||||
| GHOST_WIN32_EnableNonClientDpiScaling fpEnableNonClientDpiScaling = | GHOST_WIN32_EnableNonClientDpiScaling fpEnableNonClientDpiScaling = | ||||
| (GHOST_WIN32_EnableNonClientDpiScaling)::GetProcAddress(m_user32, | (GHOST_WIN32_EnableNonClientDpiScaling)::GetProcAddress(m_user32, | ||||
| "EnableNonClientDpiScaling"); | "EnableNonClientDpiScaling"); | ||||
| if (fpEnableNonClientDpiScaling) { | if (fpEnableNonClientDpiScaling) { | ||||
| fpEnableNonClientDpiScaling(hwnd); | fpEnableNonClientDpiScaling(hwnd); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #endif | |||||
| GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWLP_USERDATA); | GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWLP_USERDATA); | ||||
| if (window) { | if (window) { | ||||
| switch (msg) { | switch (msg) { | ||||
| // we need to check if new key layout has AltGr | // we need to check if new key layout has AltGr | ||||
| case WM_INPUTLANGCHANGE: { | case WM_INPUTLANGCHANGE: { | ||||
| system->handleKeyboardChange(); | system->handleKeyboardChange(); | ||||
| #ifdef WITH_INPUT_IME | #ifdef WITH_INPUT_IME | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||