From e9645806f5638005aede02841eb6da9607558fcb Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 26 Nov 2014 16:46:01 +0500 Subject: [PATCH] Fix T42420: Touchpad zoom and scroll gester using touchpad stopped working Seems to be an own mistake on using Windows API. --- intern/ghost/intern/GHOST_SystemWin32.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 0767ad5a8f9..d65999717ff 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1060,17 +1060,13 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, /* Get the winow under the mouse and send event to it's queue. */ POINT mouse_pos = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; - HWND mouse_hwnd = WindowFromPoint(mouse_pos); + HWND mouse_hwnd = ChildWindowFromPoint(HWND_DESKTOP, mouse_pos); GHOST_WindowWin32 *mouse_window = (GHOST_WindowWin32 *)::GetWindowLongPtr(mouse_hwnd, GWLP_USERDATA); if (mouse_window != NULL) { event = processWheelEvent(mouse_window, wParam, lParam); } else { - /* If it happened so window under the mouse is not found (which i'm not - * really sure might happen), then we add event to the focused window - * in order to avoid some possible negative side effects. - * - sergey - - */ + /* Happens when wmouse is not over of any of blender windows. */ event = processWheelEvent(window, wParam, lParam); }