Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Rishel <rishel.nick@gmail.com>2021-06-08 06:15:28 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2021-06-08 06:15:28 +0300
commit2e46a8c8647898475004193419bd83de12f1413e (patch)
tree41d69ae4116acb7daa6cf8d51e394a4e9fc2cd6b /intern/ghost/intern
parentef5a362a5b2422451124b84a22b84b4e74c2a792 (diff)
Remove noop code from WM_MOUSEWHEEL processing.
ChildWindowFromPoint retrieves the child of the provided window at a point. In this case it always returns 0 because HWND_DESKTOP is flag defined as 0, which is never a valid window handle and is not intended for use in place of a window handle. Forwarding of mousewheel events was added in adb08def613d, and later modified to the current unworking state in e9645806f563. Sending mouse wheel events to the window under the cursor is a system preference and therefore should not be overridden by Blender, therefore the noop code has been removed.
Diffstat (limited to 'intern/ghost/intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index fc3cb81e26a..c3a243cc22c 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1462,14 +1462,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
* since DefWindowProc propagates it up the parent chain
* until it finds a window that processes it.
*/
-
- /* Get the window under the mouse and send event to its queue. */
- POINT mouse_pos = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
- HWND mouse_hwnd = ChildWindowFromPoint(HWND_DESKTOP, mouse_pos);
- GHOST_WindowWin32 *mouse_window = (GHOST_WindowWin32 *)::GetWindowLongPtr(mouse_hwnd,
- GWLP_USERDATA);
-
- processWheelEvent(mouse_window ? mouse_window : window, wParam, lParam);
+ processWheelEvent(window, wParam, lParam);
eventHandled = true;
#ifdef BROKEN_PEEK_TOUCHPAD
PostMessage(hwnd, WM_USER, 0, 0);