diff options
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWin32.cpp')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index ca2768ec161..8cfd2856231 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -115,6 +115,17 @@ #define VK_MEDIA_PLAY_PAUSE 0xB3 #endif // VK_MEDIA_PLAY_PAUSE +/* Workaround for some laptop touchpads, some of which seems to + * have driver issues which makes it so window function receives + * the message, but PeekMessage doesn't pick those messages for + * some reason. + * + * We send a dummy WM_USER message to force PeekMessage to receive + * something, making it so blender's window manager sees the new + * messages coming in. + */ +#define BROKEN_PEEK_TOUCHPAD + static void initRawInput() { #ifdef WITH_INPUT_NDOF @@ -1053,6 +1064,10 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * until it finds a window that processes it. */ event = processWheelEvent(window, wParam, lParam); + +#ifdef BROKEN_PEEK_TOUCHPAD + PostMessage(hwnd, WM_USER, 0, 0); +#endif break; case WM_SETCURSOR: /* The WM_SETCURSOR message is sent to a window if the mouse causes the cursor |