You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
user32-rawinput-*: Updates from Rémi Bernon.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 8016a35cf5771858b2b6245ee22e60c23a1bafd6 Mon Sep 17 00:00:00 2001
|
||||
From be00910ebbb1277a5e34e982450a20821757fa25 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 17 Jan 2020 16:33:11 +0100
|
||||
Subject: [PATCH] winex11.drv: Split XInput2 thread initialization.
|
||||
@@ -93,7 +93,7 @@ index 42bac332664..ce77c7e5985 100644
|
||||
#if defined(SONAME_LIBXI) && defined(HAVE_X11_EXTENSIONS_XINPUT2_H)
|
||||
int event, error;
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 45855976607..16a8a6be2be 100644
|
||||
index c23cd512eb9..a46d9ef430c 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -195,7 +195,8 @@ extern BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 7158d919b04dc9229064370be73e3bc01fb3f782 Mon Sep 17 00:00:00 2001
|
||||
From 1d33d9f94c680dc433394fc525d6ab238914006e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 23 Jan 2020 11:00:19 +0100
|
||||
Subject: [PATCH] winex11.drv: Support XInput2 events for individual windows.
|
||||
@@ -26,7 +26,7 @@ index b517e44e150..6f46ef505c9 100644
|
||||
|
||||
X11DRV_init_desktop( win, width, height );
|
||||
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
||||
index 9de7ffa3f3c..14770d3364a 100644
|
||||
index 1772a27c48b..bc007bea1d6 100644
|
||||
--- a/dlls/winex11.drv/event.c
|
||||
+++ b/dlls/winex11.drv/event.c
|
||||
@@ -245,6 +245,13 @@ static Bool filter_event( Display *display, XEvent *event, char *arg )
|
||||
@@ -185,7 +185,7 @@ index ce77c7e5985..2550af3cb9c 100644
|
||||
}
|
||||
else if (prev_clip_hwnd)
|
||||
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
|
||||
index cfac86c224d..b2c5f4016fe 100644
|
||||
index 386f21c85d4..0ab5b5b8952 100644
|
||||
--- a/dlls/winex11.drv/window.c
|
||||
+++ b/dlls/winex11.drv/window.c
|
||||
@@ -375,6 +375,7 @@ static void sync_window_style( struct x11drv_win_data *data )
|
||||
@@ -213,7 +213,7 @@ index cfac86c224d..b2c5f4016fe 100644
|
||||
SetPropA( hwnd, clip_window_prop, (HANDLE)data->clip_window );
|
||||
X11DRV_InitClipboard();
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 6f254368ab7..b014fd6ae11 100644
|
||||
index a46d9ef430c..8c4a46c07c2 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -197,6 +197,8 @@ extern BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
|
||||
@@ -225,7 +225,7 @@ index 6f254368ab7..b014fd6ae11 100644
|
||||
|
||||
extern DWORD copy_image_bits( BITMAPINFO *info, BOOL is_r8g8b8, XImage *image,
|
||||
const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits,
|
||||
@@ -325,6 +327,14 @@ struct x11drv_valuator_data
|
||||
@@ -324,6 +326,14 @@ struct x11drv_valuator_data
|
||||
int number;
|
||||
};
|
||||
|
||||
@@ -240,7 +240,7 @@ index 6f254368ab7..b014fd6ae11 100644
|
||||
struct x11drv_thread_data
|
||||
{
|
||||
Display *display;
|
||||
@@ -340,7 +350,7 @@ struct x11drv_thread_data
|
||||
@@ -338,7 +348,7 @@ struct x11drv_thread_data
|
||||
Window clip_window; /* window used for cursor clipping */
|
||||
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
|
||||
DWORD clip_reset; /* time when clipping was last reset */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e71967fd27b8fb686311dfc1463fe32956d1d23f Mon Sep 17 00:00:00 2001
|
||||
From 08b4f1cfa36dafe4b31f1aedc9367a125ad6cf85 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 2 Aug 2019 02:24:32 -0400
|
||||
Subject: [PATCH] winex11.drv: Advertise XInput2 version 2.1 support.
|
||||
@@ -125,10 +125,10 @@ index 2550af3cb9c..0d41438c5c7 100644
|
||||
x_rel = &thread_data->x_rel_valuator;
|
||||
y_rel = &thread_data->y_rel_valuator;
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index b014fd6ae11..e7e75d4d072 100644
|
||||
index 8c4a46c07c2..b7c876e35fe 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -351,12 +351,9 @@ struct x11drv_thread_data
|
||||
@@ -349,12 +349,9 @@ struct x11drv_thread_data
|
||||
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
|
||||
DWORD clip_reset; /* time when clipping was last reset */
|
||||
enum xi2_state xi2_state; /* XInput2 state */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f75111bb0bcc4478dab7b00ddf66362bf29b0624 Mon Sep 17 00:00:00 2001
|
||||
From 29097b205bc5d0861d14409988da04880626b879 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 19 Dec 2019 22:34:44 +0100
|
||||
Subject: [PATCH] winex11.drv: Keep track of pointer and device button
|
||||
@@ -16,10 +16,10 @@ Original patch by Andrew Eikum <aeikum@codeweavers.com>.
|
||||
4 files changed, 106 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
|
||||
index ce10f6ee1a3..390b36e7695 100644
|
||||
index d86f418a64e..f905794b23a 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -1942,13 +1942,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
|
||||
@@ -1882,13 +1882,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
|
||||
{
|
||||
HWND hwnd;
|
||||
|
||||
@@ -196,10 +196,10 @@ index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
|
||||
xinput2_available = XQueryExtension( gdi_display, "XInputExtension", &xinput2_opcode, &event, &error );
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index e7e75d4d072..2e5a045415e 100644
|
||||
index b7c876e35fe..7a89a010395 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -646,6 +646,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
|
||||
@@ -643,6 +643,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
|
||||
extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN;
|
||||
extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
|
||||
@@ -208,10 +208,10 @@ index e7e75d4d072..2e5a045415e 100644
|
||||
DWORD mask, DWORD flags ) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index f1e50f56659..11ecf7aeed8 100644
|
||||
index 43c30ab369c..d8576949aea 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -617,6 +617,7 @@ static BOOL process_attach(void)
|
||||
@@ -616,6 +616,7 @@ static BOOL process_attach(void)
|
||||
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
|
||||
#endif
|
||||
X11DRV_InitKeyboard( gdi_display );
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From ce3b572e3b0ac1b19e9d032039435044e51929de Mon Sep 17 00:00:00 2001
|
||||
From b0e9308f959238859ddd0e8383c024e3e5020d54 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 26 Aug 2019 14:37:20 +0200
|
||||
Subject: [PATCH] server: Add send_hardware_message flags for rawinput
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput
|
||||
3 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
|
||||
index f986b71953a..98f6c2730e0 100644
|
||||
index a80fb8c57ea..f0d4fa9cd14 100644
|
||||
--- a/dlls/user32/message.c
|
||||
+++ b/dlls/user32/message.c
|
||||
@@ -3259,6 +3259,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
@@ -3278,6 +3278,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
req->input.mouse.flags = input->u.mi.dwFlags;
|
||||
req->input.mouse.time = input->u.mi.time;
|
||||
req->input.mouse.info = input->u.mi.dwExtraInfo;
|
||||
@@ -22,7 +22,7 @@ index f986b71953a..98f6c2730e0 100644
|
||||
break;
|
||||
case INPUT_KEYBOARD:
|
||||
req->input.kbd.vkey = input->u.ki.wVk;
|
||||
@@ -3266,6 +3267,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
@@ -3285,6 +3286,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
req->input.kbd.flags = input->u.ki.dwFlags;
|
||||
req->input.kbd.time = input->u.ki.time;
|
||||
req->input.kbd.info = input->u.ki.dwExtraInfo;
|
||||
@@ -31,10 +31,10 @@ index f986b71953a..98f6c2730e0 100644
|
||||
case INPUT_HARDWARE:
|
||||
req->input.hw.msg = input->u.hi.uMsg;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 829216b58c1..90379955ecd 100644
|
||||
index eb15cef6fdb..e098c78a125 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -2054,6 +2054,7 @@ enum message_type
|
||||
@@ -2044,6 +2044,7 @@ enum message_type
|
||||
VARARG(keystate,bytes); /* global state array for all the keys */
|
||||
@END
|
||||
#define SEND_HWMSG_INJECTED 0x01
|
||||
@@ -43,10 +43,10 @@ index 829216b58c1..90379955ecd 100644
|
||||
|
||||
/* Get a message from the current queue */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index a411d0af8d2..a928f4d7fad 100644
|
||||
index 3e6050686ae..c87e1ddb0d4 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -1782,7 +1782,7 @@ done:
|
||||
@@ -1732,7 +1732,7 @@ done:
|
||||
|
||||
/* queue a hardware message for a mouse event */
|
||||
static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
|
||||
@@ -55,7 +55,7 @@ index a411d0af8d2..a928f4d7fad 100644
|
||||
{
|
||||
const struct rawinput_device *device;
|
||||
struct hardware_msg_data *msg_data;
|
||||
@@ -1837,7 +1837,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
@@ -1787,7 +1787,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
y = desktop->cursor.y;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index a411d0af8d2..a928f4d7fad 100644
|
||||
{
|
||||
raw_msg.foreground = foreground;
|
||||
raw_msg.desktop = desktop;
|
||||
@@ -1896,7 +1896,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
@@ -1846,7 +1846,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
|
||||
/* queue a hardware message for a keyboard event */
|
||||
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
|
||||
@@ -73,7 +73,7 @@ index a411d0af8d2..a928f4d7fad 100644
|
||||
{
|
||||
struct hw_msg_source source = { IMDT_KEYBOARD, origin };
|
||||
const struct rawinput_device *device;
|
||||
@@ -1974,7 +1974,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
|
||||
@@ -1924,7 +1924,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -82,20 +82,19 @@ index a411d0af8d2..a928f4d7fad 100644
|
||||
{
|
||||
raw_msg.foreground = foreground;
|
||||
raw_msg.desktop = desktop;
|
||||
@@ -2603,11 +2603,11 @@ DECL_HANDLER(send_hardware_message)
|
||||
@@ -2540,10 +2540,10 @@ DECL_HANDLER(send_hardware_message)
|
||||
switch (req->input.type)
|
||||
{
|
||||
case INPUT_MOUSE:
|
||||
if (!desktop) return;
|
||||
- reply->wait = queue_mouse_message( desktop, req->win, &req->input, origin, sender );
|
||||
+ reply->wait = queue_mouse_message( desktop, req->win, &req->input, origin, sender, req->flags );
|
||||
break;
|
||||
case INPUT_KEYBOARD:
|
||||
if (!desktop) return;
|
||||
- reply->wait = queue_keyboard_message( desktop, req->win, &req->input, origin, sender );
|
||||
+ reply->wait = queue_keyboard_message( desktop, req->win, &req->input, origin, sender, req->flags );
|
||||
break;
|
||||
case INPUT_HARDWARE:
|
||||
if (!desktop) set_error( STATUS_SUCCESS );
|
||||
queue_custom_hardware_message( desktop, req->win, origin, &req->input );
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5505c3b36acb807fe810dad5094806205f2be804 Mon Sep 17 00:00:00 2001
|
||||
From 59581c76996e2bee0844dfb51b0340d705ef1c5c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Wed, 24 Mar 2021 23:29:28 +0100
|
||||
Subject: [PATCH] user32: Set SEND_HWMSG_RAWINPUT flags only when RAWINPUT is
|
||||
@@ -20,10 +20,10 @@ __wine_send_input with INPUT_HARDWARE input type and a rawinput.
|
||||
9 files changed, 26 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||||
index 805bfe3e9de..e78c6b9ce83 100644
|
||||
index 64d7829e258..38a070fa87d 100644
|
||||
--- a/dlls/user32/input.c
|
||||
+++ b/dlls/user32/input.c
|
||||
@@ -181,6 +181,7 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size )
|
||||
@@ -235,6 +235,7 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size )
|
||||
{
|
||||
UINT i;
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
@@ -31,7 +31,7 @@ index 805bfe3e9de..e78c6b9ce83 100644
|
||||
|
||||
if (size != sizeof(INPUT))
|
||||
{
|
||||
@@ -210,7 +211,7 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size )
|
||||
@@ -264,7 +265,7 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size )
|
||||
update_mouse_coords( &input );
|
||||
/* fallthrough */
|
||||
case INPUT_KEYBOARD:
|
||||
@@ -41,10 +41,10 @@ index 805bfe3e9de..e78c6b9ce83 100644
|
||||
case INPUT_HARDWARE:
|
||||
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
||||
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
|
||||
index 98f6c2730e0..43c6adad033 100644
|
||||
index f0d4fa9cd14..702e5892a4d 100644
|
||||
--- a/dlls/user32/message.c
|
||||
+++ b/dlls/user32/message.c
|
||||
@@ -3259,7 +3259,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
@@ -3278,7 +3278,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
req->input.mouse.flags = input->u.mi.dwFlags;
|
||||
req->input.mouse.time = input->u.mi.time;
|
||||
req->input.mouse.info = input->u.mi.dwExtraInfo;
|
||||
@@ -53,7 +53,7 @@ index 98f6c2730e0..43c6adad033 100644
|
||||
break;
|
||||
case INPUT_KEYBOARD:
|
||||
req->input.kbd.vkey = input->u.ki.wVk;
|
||||
@@ -3267,7 +3267,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
@@ -3286,7 +3286,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
req->input.kbd.flags = input->u.ki.dwFlags;
|
||||
req->input.kbd.time = input->u.ki.time;
|
||||
req->input.kbd.info = input->u.ki.dwExtraInfo;
|
||||
@@ -63,7 +63,7 @@ index 98f6c2730e0..43c6adad033 100644
|
||||
case INPUT_HARDWARE:
|
||||
req->input.hw.msg = input->u.hi.uMsg;
|
||||
diff --git a/dlls/wineandroid.drv/keyboard.c b/dlls/wineandroid.drv/keyboard.c
|
||||
index 0a6ede0ec5f..df85188fbbb 100644
|
||||
index 803f13d8f39..a9563161ece 100644
|
||||
--- a/dlls/wineandroid.drv/keyboard.c
|
||||
+++ b/dlls/wineandroid.drv/keyboard.c
|
||||
@@ -671,6 +671,7 @@ static BOOL get_async_key_state( BYTE state[256] )
|
||||
@@ -84,7 +84,7 @@ index 0a6ede0ec5f..df85188fbbb 100644
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
|
||||
index 1cb1bbbadc9..92a1c5012a0 100644
|
||||
index 997bce15964..d169fb78d78 100644
|
||||
--- a/dlls/wineandroid.drv/window.c
|
||||
+++ b/dlls/wineandroid.drv/window.c
|
||||
@@ -428,6 +428,7 @@ static int process_events( DWORD mask )
|
||||
@@ -147,10 +147,10 @@ index f2368c10743..89f6d9c617d 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c
|
||||
index 1ea15f59341..b4d50058d4e 100644
|
||||
index f4b955cd46a..0cdfc96ea0b 100644
|
||||
--- a/dlls/winemac.drv/keyboard.c
|
||||
+++ b/dlls/winemac.drv/keyboard.c
|
||||
@@ -918,6 +918,7 @@ void macdrv_compute_keyboard_layout(struct macdrv_thread_data *thread_data)
|
||||
@@ -916,6 +916,7 @@ void macdrv_compute_keyboard_layout(struct macdrv_thread_data *thread_data)
|
||||
*/
|
||||
static void macdrv_send_keyboard_input(HWND hwnd, WORD vkey, WORD scan, DWORD flags, DWORD time)
|
||||
{
|
||||
@@ -158,7 +158,7 @@ index 1ea15f59341..b4d50058d4e 100644
|
||||
INPUT input;
|
||||
|
||||
TRACE_(key)("hwnd %p vkey=%04x scan=%04x flags=%04x\n", hwnd, vkey, scan, flags);
|
||||
@@ -929,7 +930,7 @@ static void macdrv_send_keyboard_input(HWND hwnd, WORD vkey, WORD scan, DWORD fl
|
||||
@@ -927,7 +928,7 @@ static void macdrv_send_keyboard_input(HWND hwnd, WORD vkey, WORD scan, DWORD fl
|
||||
input.ki.time = time;
|
||||
input.ki.dwExtraInfo = 0;
|
||||
|
||||
@@ -189,7 +189,7 @@ index d2278ae0e4c..d6598617456 100644
|
||||
|
||||
|
||||
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
|
||||
index 272f728def9..2e87eeede99 100644
|
||||
index f905794b23a..7f305ff377c 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -1137,6 +1137,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1ab8aaf4c6d73f8414f5c77db096655a5e08f310 Mon Sep 17 00:00:00 2001
|
||||
From 2e661c0f3384f920f97b3c78e94096233093b4ac 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
|
||||
@@ -6,49 +6,40 @@ Subject: [PATCH] user32: Support sending RIM_TYPEMOUSE through
|
||||
|
||||
---
|
||||
dlls/user32/message.c | 6 ++++++
|
||||
server/queue.c | 5 ++++-
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
server/queue.c | 3 +++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
|
||||
index 0f724a0acc3..3fe2fc3ce6a 100644
|
||||
index 702e5892a4d..98c9648e36b 100644
|
||||
--- a/dlls/user32/message.c
|
||||
+++ b/dlls/user32/message.c
|
||||
@@ -3290,6 +3290,12 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
@@ -3298,6 +3298,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.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;
|
||||
+ req->input.hw.rawinput.mouse.data = rawinput->data.mouse.ulRawButtons;
|
||||
+ req->input.hw.lparam = rawinput->data.mouse.usFlags;
|
||||
+ break;
|
||||
case RIM_TYPEHID:
|
||||
assert( rawinput->data.hid.dwCount <= 1 );
|
||||
req->input.hw.rawinput.hid.device = HandleToUlong( rawinput->header.hDevice );
|
||||
req->input.hw.rawinput.hid.param = rawinput->header.wParam;
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 52a16825778..9e47a465613 100644
|
||||
index c87e1ddb0d4..55580fe1122 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -2054,7 +2054,7 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
|
||||
raw_msg.extra = NULL;
|
||||
raw_msg.extra_len = 0;
|
||||
|
||||
- if (input->hw.msg == WM_INPUT)
|
||||
+ 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_
|
||||
@@ -2016,6 +2016,9 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
|
||||
msg_data->flags = 0;
|
||||
msg_data->rawinput = input->hw.rawinput;
|
||||
|
||||
+ 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.rawinput.type == RIM_TYPEHID &&
|
||||
input->hw.rawinput.hid.param == GIDC_ARRIVAL)
|
||||
enum_processes( queue_rawinput_message, &raw_msg );
|
||||
|
||||
if (raw_msg.foreground) release_object( raw_msg.foreground );
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 22846605056d89063ec4c78b353f48d76b39b41f Mon Sep 17 00:00:00 2001
|
||||
From a5f930d50c026021b7d7ccac2cb2a58d43abff12 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 25 Mar 2021 16:12:58 +0100
|
||||
Subject: [PATCH] winex11.drv: Listen to RawMotion and RawButton* events in the
|
||||
@@ -9,13 +9,13 @@ to trigger low-level hooks callbacks when clipping cursor. This is for
|
||||
instance used in our dinput implementation.
|
||||
---
|
||||
dlls/winex11.drv/event.c | 10 ++-
|
||||
dlls/winex11.drv/mouse.c | 107 ++++++++++++++++++++++++++++++---
|
||||
dlls/winex11.drv/mouse.c | 111 ++++++++++++++++++++++++++++++---
|
||||
dlls/winex11.drv/x11drv.h | 1 +
|
||||
dlls/winex11.drv/x11drv_main.c | 4 ++
|
||||
4 files changed, 111 insertions(+), 11 deletions(-)
|
||||
4 files changed, 115 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
||||
index 217c1eca857..8685ce9536b 100644
|
||||
index bc007bea1d6..bdfc133774a 100644
|
||||
--- a/dlls/winex11.drv/event.c
|
||||
+++ b/dlls/winex11.drv/event.c
|
||||
@@ -328,6 +328,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE
|
||||
@@ -54,7 +54,7 @@ index 217c1eca857..8685ce9536b 100644
|
||||
#endif
|
||||
}
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index 6b6512521f4..0558467a805 100644
|
||||
index 6b6512521f4..7ff360d5127 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -422,7 +422,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask )
|
||||
@@ -128,7 +128,7 @@ index 6b6512521f4..0558467a805 100644
|
||||
input.u.mi.mouseData = 0;
|
||||
input.u.mi.dwFlags = MOUSEEVENTF_MOVE;
|
||||
input.u.mi.time = EVENT_x11_time_to_win32_time( event->time );
|
||||
@@ -1987,10 +1997,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
@@ -1987,10 +1997,89 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -148,16 +148,18 @@ index 6b6512521f4..0558467a805 100644
|
||||
+ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE);
|
||||
+ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */
|
||||
+ rawinput.header.wParam = RIM_INPUT;
|
||||
+ rawinput.data.mouse.ulRawButtons = input.u.mi.dwFlags;
|
||||
+ rawinput.data.mouse.u.ulButtons = input.u.mi.mouseData;
|
||||
+ rawinput.data.mouse.usFlags = input.u.mi.dwFlags;
|
||||
+ rawinput.data.mouse.ulRawButtons = 0;
|
||||
+ rawinput.data.mouse.u.usButtonData = 0;
|
||||
+ rawinput.data.mouse.u.usButtonFlags = 0;
|
||||
+ rawinput.data.mouse.lLastX = input.u.mi.dx;
|
||||
+ rawinput.data.mouse.lLastY = input.u.mi.dy;
|
||||
+ rawinput.data.mouse.ulExtraInformation = 0;
|
||||
+
|
||||
+ input.type = INPUT_HARDWARE;
|
||||
+ input.u.hi.uMsg = WM_INPUT;
|
||||
+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16);
|
||||
+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0);
|
||||
+ input.u.hi.wParamH = 0;
|
||||
+ input.u.hi.wParamL = 0;
|
||||
+ if (rawinput.data.mouse.lLastX || rawinput.data.mouse.lLastY)
|
||||
+ __wine_send_input( 0, &input, &rawinput );
|
||||
+ }
|
||||
@@ -196,28 +198,30 @@ index 6b6512521f4..0558467a805 100644
|
||||
+ rawinput.header.wParam = RIM_INPUT;
|
||||
+ if (event->evtype == XI_RawButtonRelease)
|
||||
+ {
|
||||
+ rawinput.data.mouse.ulRawButtons = button_up_flags[button];
|
||||
+ rawinput.data.mouse.u.ulButtons = button_up_data[button];
|
||||
+ rawinput.data.mouse.usFlags = button_up_flags[button];
|
||||
+ rawinput.data.mouse.ulRawButtons = button_up_data[button];
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ rawinput.data.mouse.ulRawButtons = button_down_flags[button];
|
||||
+ rawinput.data.mouse.u.ulButtons = button_down_data[button];
|
||||
+ rawinput.data.mouse.usFlags = button_down_flags[button];
|
||||
+ rawinput.data.mouse.ulRawButtons = button_down_data[button];
|
||||
+ }
|
||||
+ rawinput.data.mouse.u.usButtonData = 0;
|
||||
+ rawinput.data.mouse.u.usButtonFlags = 0;
|
||||
+ rawinput.data.mouse.lLastX = 0;
|
||||
+ rawinput.data.mouse.lLastY = 0;
|
||||
+ rawinput.data.mouse.ulExtraInformation = 0;
|
||||
+
|
||||
+ input.type = INPUT_HARDWARE;
|
||||
+ input.u.hi.uMsg = WM_INPUT;
|
||||
+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16);
|
||||
+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0);
|
||||
+ if (rawinput.data.mouse.ulRawButtons || rawinput.data.mouse.u.ulButtons)
|
||||
+ input.u.hi.wParamH = 0;
|
||||
+ input.u.hi.wParamL = 0;
|
||||
+ if (rawinput.data.mouse.usFlags || rawinput.data.mouse.ulRawButtons)
|
||||
+ __wine_send_input( 0, &input, &rawinput );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2066,6 +2151,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev )
|
||||
@@ -2066,6 +2155,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev )
|
||||
case XI_RawMotion:
|
||||
ret = X11DRV_RawMotion( event );
|
||||
break;
|
||||
@@ -229,10 +233,10 @@ index 6b6512521f4..0558467a805 100644
|
||||
default:
|
||||
TRACE( "Unhandled event %#x\n", event->evtype );
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index afa990b7e68..910a6c6cc18 100644
|
||||
index 7a89a010395..2fd8519971d 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -353,6 +353,7 @@ struct x11drv_thread_data
|
||||
@@ -352,6 +352,7 @@ struct x11drv_thread_data
|
||||
struct x11drv_valuator_data x_rel_valuator;
|
||||
struct x11drv_valuator_data y_rel_valuator;
|
||||
int xi2_core_pointer; /* XInput2 core pointer id */
|
||||
|
@@ -1,5 +1,3 @@
|
||||
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
|
||||
|
Reference in New Issue
Block a user