Rebase against 44cb53bb37d3c40ea90aec6e35a9c08326b6e848.

This commit is contained in:
Zebediah Figura
2021-05-11 01:01:15 -05:00
parent 8e5c8cc63b
commit 7f18df4633
14 changed files with 69 additions and 578 deletions

View File

@ -1,4 +1,4 @@
From ba34a1671d177a18391e3bf8619cea68eead6e34 Mon Sep 17 00:00:00 2001
From 1ab8aaf4c6d73f8414f5c77db096655a5e08f310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 25 Mar 2021 14:26:35 +0100
Subject: [PATCH] user32: Support sending RIM_TYPEMOUSE through
@ -10,24 +10,24 @@ Subject: [PATCH] user32: Support sending RIM_TYPEMOUSE through
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 43c6adad033..d62da5de16f 100644
index 0f724a0acc3..3fe2fc3ce6a 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -3279,6 +3279,12 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
req->input.hw.data.rawinput.type = rawinput->header.dwType;
@@ -3290,6 +3290,12 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
req->input.hw.rawinput.type = rawinput->header.dwType;
switch (rawinput->header.dwType)
{
+ case RIM_TYPEMOUSE:
+ req->input.hw.data.rawinput.mouse.x = rawinput->data.mouse.lLastX;
+ req->input.hw.data.rawinput.mouse.y = rawinput->data.mouse.lLastY;
+ req->input.hw.data.rawinput.mouse.data = rawinput->data.mouse.u.ulButtons;
+ req->input.hw.rawinput.mouse.x = rawinput->data.mouse.lLastX;
+ req->input.hw.rawinput.mouse.y = rawinput->data.mouse.lLastY;
+ req->input.hw.rawinput.mouse.data = rawinput->data.mouse.u.ulButtons;
+ req->input.hw.lparam = rawinput->data.mouse.ulRawButtons;
+ break;
case RIM_TYPEHID:
assert( rawinput->data.hid.dwCount <= 1 );
req->input.hw.data.rawinput.hid.device = HandleToUlong( rawinput->header.hDevice );
req->input.hw.rawinput.hid.device = HandleToUlong( rawinput->header.hDevice );
diff --git a/server/queue.c b/server/queue.c
index a928f4d7fad..9008f8e90ff 100644
index 52a16825778..9e47a465613 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2054,7 +2054,7 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
@ -35,20 +35,20 @@ index a928f4d7fad..9008f8e90ff 100644
raw_msg.extra_len = 0;
- if (input->hw.msg == WM_INPUT)
+ if (input->hw.msg == WM_INPUT && input->hw.data.rawinput.type == RIM_TYPEHID)
+ if (input->hw.msg == WM_INPUT && input->hw.rawinput.type == RIM_TYPEHID)
{
raw_msg.extra = get_req_data();
raw_msg.extra_len = get_req_data_size();
@@ -2065,6 +2065,9 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
msg_data->flags = 0;
msg_data->rawinput = input->hw.data.rawinput;
msg_data->rawinput = input->hw.rawinput;
+ if (input->hw.msg == WM_INPUT && input->hw.data.rawinput.type == RIM_TYPEMOUSE)
+ if (input->hw.msg == WM_INPUT && input->hw.rawinput.type == RIM_TYPEMOUSE)
+ msg_data->flags = input->hw.lparam;
+
if (input->hw.msg == WM_INPUT_DEVICE_CHANGE &&
input->hw.data.rawinput.type == RIM_TYPEHID &&
input->hw.data.rawinput.hid.param == GIDC_ARRIVAL)
input->hw.rawinput.type == RIM_TYPEHID &&
input->hw.rawinput.hid.param == GIDC_ARRIVAL)
--
2.30.2

View File

@ -1,3 +1,5 @@
Fixes: [42631] Mouse drift, jump or don't react to small slow movements in Unity-engine games and Fallout 4 (partly fixed in Unity games, have walkaround in Fallout4 )
Fixes: [42675] Overwatch: Phantom mouse input / view pulled up to ceiling
Depends: user32-rawinput-hid
# In the process of upstreaming.
Disabled: true