[Bf-blender-cvs] [2e46a8c8647] master: Remove noop code from WM_MOUSEWHEEL processing.

Nicholas Rishel noreply at git.blender.org
Tue Jun 8 05:18:09 CEST 2021


Commit: 2e46a8c8647898475004193419bd83de12f1413e
Author: Nicholas Rishel
Date:   Mon Jun 7 20:15:28 2021 -0700
Branches: master
https://developer.blender.org/rB2e46a8c8647898475004193419bd83de12f1413e

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.

===================================================================

M	intern/ghost/intern/GHOST_SystemWin32.cpp

===================================================================

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



More information about the Bf-blender-cvs mailing list