Fix T42420: Touchpad zoom and scroll gester using touchpad stopped working

Seems to be an own mistake on using Windows API.
This commit is contained in:
Sergey Sharybin 2014-11-26 16:46:01 +05:00
parent 98d4831969
commit e9645806f5
Notes: blender-bot 2023-02-14 10:21:10 +01:00
Referenced by commit 2e46a8c864, Remove noop code from WM_MOUSEWHEEL processing.
Referenced by issue #42420, Touchpad zoom and scroll gester using touchpad stopped working on Lenovo Thinkpad Laptop E520
1 changed files with 2 additions and 6 deletions

View File

@ -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);
}