[Bf-blender-cvs] [d9fdd82e547] pygpu_extensions: Fix T85562: Remove Win32 RIM_INPUTSINK

Harley Acheson noreply at git.blender.org
Fri Feb 12 22:56:29 CET 2021


Commit: d9fdd82e54768d8f8a193413d7045691f06cccb9
Author: Harley Acheson
Date:   Fri Feb 12 10:39:33 2021 -0800
Branches: pygpu_extensions
https://developer.blender.org/rBd9fdd82e54768d8f8a193413d7045691f06cccb9

Fix T85562: Remove Win32 RIM_INPUTSINK

Removal of Win32 code that allows background windows to receive raw input.

Differential Revision: https://developer.blender.org/D10408

Reviewed by Brecht Van Lommel

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

M	intern/ghost/intern/GHOST_SystemWin32.cpp
M	intern/ghost/intern/GHOST_WindowWin32.cpp

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

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index b71b6b9e170..fb53357bb24 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1511,12 +1511,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
         // Keyboard events, processed
         ////////////////////////////////////////////////////////////////////////
         case WM_INPUT: {
-          // check WM_INPUT from input sink when ghost window is not in the foreground
-          if (wParam == RIM_INPUTSINK) {
-            if (GetFocus() != hwnd)  // WM_INPUT message not for this window
-              return 0;
-          }  // else wParam == RIM_INPUT
-
           RAWINPUT raw;
           RAWINPUT *raw_ptr = &raw;
           UINT rawSize = sizeof(RAWINPUT);
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 18aa19c0863..377eb61874d 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -220,16 +220,6 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
     }
   }
 
-  if (parentwindow && !dialog) {
-    RAWINPUTDEVICE device = {0};
-    device.usUsagePage = 0x01; /* usUsagePage & usUsage for keyboard*/
-    device.usUsage = 0x06;     /* http://msdn.microsoft.com/en-us/windows/hardware/gg487473.aspx */
-    device.dwFlags |=
-        RIDEV_INPUTSINK;  // makes WM_INPUT is visible for ghost when has parent window
-    device.hwndTarget = m_hWnd;
-    RegisterRawInputDevices(&device, 1, sizeof(device));
-  }
-
   // Initialize Windows Ink
   if (m_user32) {
     m_fpGetPointerInfoHistory = (GHOST_WIN32_GetPointerInfoHistory)::GetProcAddress(



More information about the Bf-blender-cvs mailing list