Rebase against 649385e7d47091fa25b9114668075b06d2942e2f.

This commit is contained in:
Alistair Leslie-Hughes 2021-06-05 10:46:23 +10:00
parent 3e16509e0e
commit a534ddb0a0
3 changed files with 22 additions and 17 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "0807b09cfa7f2446f7a69f99ff1006e88c9de60b"
echo "649385e7d47091fa25b9114668075b06d2942e2f"
}
# Show version information

View File

@ -1,4 +1,4 @@
From f687aaf5963a1f2b10a4fa4212c93e5361afe927 Mon Sep 17 00:00:00 2001
From 95da86f70402fee377fa67309fa44f0a4f33e2fa Mon Sep 17 00:00:00 2001
From: Derek Lesho <dereklesho52@Gmail.com>
Date: Tue, 25 Jun 2019 22:37:34 -0400
Subject: [PATCH] winex11.drv: Add support for absolute RawMotion events.
@ -18,32 +18,37 @@ example - while their axis valuators keep their "Abs X/Y" name. We can
however use the valuator mode to distinguish between relative movements
and absolute position events.
---
dlls/user32/rawinput.c | 7 ++-
dlls/user32/rawinput.c | 12 +++--
dlls/winex11.drv/mouse.c | 94 +++++++++++++++++++++-------------
dlls/winex11.drv/window.c | 3 +-
dlls/winex11.drv/x11drv.h | 18 +++----
dlls/winex11.drv/x11drv_main.c | 2 +
server/queue.c | 4 +-
6 files changed, 80 insertions(+), 48 deletions(-)
6 files changed, 83 insertions(+), 50 deletions(-)
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index 41d627c62c2..22220b92462 100644
index e08d11bc20a..8ea3108560b 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -316,7 +316,12 @@ BOOL rawinput_from_hardware_message(RAWINPUT *rawinput, const struct hardware_ms
@@ -316,9 +316,15 @@ BOOL rawinput_from_hardware_message(RAWINPUT *rawinput, const struct hardware_ms
rawinput->header.hDevice = WINE_MOUSE_HANDLE;
rawinput->header.wParam = 0;
- rawinput->data.mouse.usFlags = MOUSE_MOVE_RELATIVE;
- rawinput->data.mouse.usButtonFlags = 0;
- rawinput->data.mouse.usButtonData = 0;
+ if (msg_data->flags & MOUSEEVENTF_ABSOLUTE)
+ rawinput->data.mouse.usFlags = MOUSE_MOVE_ABSOLUTE;
+ else
+ rawinput->data.mouse.usFlags = MOUSE_MOVE_RELATIVE;
+ if (msg_data->flags & MOUSEEVENTF_VIRTUALDESK)
+ rawinput->data.mouse.usFlags |= MOUSE_VIRTUAL_DESKTOP;
rawinput->data.mouse.u.s.usButtonFlags = 0;
rawinput->data.mouse.u.s.usButtonData = 0;
+ rawinput->data.mouse.usButtonFlags = 0;
+ rawinput->data.mouse.usButtonData = 0;
+
for (i = 1; i < ARRAY_SIZE(button_flags); ++i)
{
if (msg_data->flags & (1 << i))
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 7ff360d5127..76d2ba510da 100644
--- a/dlls/winex11.drv/mouse.c
@ -192,7 +197,7 @@ index 7ff360d5127..76d2ba510da 100644
}
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 92b296224eb..cd01b330881 100644
index 94844fffcdd..da5b8df943f 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -37,6 +37,8 @@
@ -213,7 +218,7 @@ index 92b296224eb..cd01b330881 100644
#include "wine/server.h"
#include "mwm.h"
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 2fd8519971d..bce49b809e2 100644
index 5f096b5d086..c1ed6eea1de 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -32,6 +32,9 @@
@ -226,7 +231,7 @@ index 2fd8519971d..bce49b809e2 100644
#define BOOL X_BOOL
#define BYTE X_BYTE
@@ -319,13 +322,6 @@ struct x11drv_escape_flush_gl_drawable
@@ -320,13 +323,6 @@ struct x11drv_escape_flush_gl_drawable
* X11 USER driver
*/
@ -240,7 +245,7 @@ index 2fd8519971d..bce49b809e2 100644
enum xi2_state
{
xi_unavailable = -1,
@@ -348,11 +344,13 @@ struct x11drv_thread_data
@@ -350,11 +346,13 @@ 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 */
@ -256,7 +261,7 @@ index 2fd8519971d..bce49b809e2 100644
};
extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN;
@@ -437,6 +435,8 @@ enum x11drv_atoms
@@ -439,6 +437,8 @@ enum x11drv_atoms
XATOM_RAW_CAP_HEIGHT,
XATOM_Rel_X,
XATOM_Rel_Y,
@ -266,7 +271,7 @@ index 2fd8519971d..bce49b809e2 100644
XATOM_WM_DELETE_WINDOW,
XATOM_WM_STATE,
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index c16825751c8..4ad6a5714ea 100644
index 369515bba71..6f1e8c6cfb6 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -142,6 +142,8 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
@ -279,10 +284,10 @@ index c16825751c8..4ad6a5714ea 100644
"WM_DELETE_WINDOW",
"WM_STATE",
diff --git a/server/queue.c b/server/queue.c
index 552b5a1fe20..d783b5ace7a 100644
index 99cfecf2507..fc86371862d 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1805,8 +1805,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -1886,8 +1886,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
msg_data->size = sizeof(*msg_data);
msg_data->flags = flags;
msg_data->rawinput.type = RIM_TYPEMOUSE;

View File

@ -1 +1 @@
0807b09cfa7f2446f7a69f99ff1006e88c9de60b
649385e7d47091fa25b9114668075b06d2942e2f