Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f86cca38
Commit
f86cca38
authored
Feb 06, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 08, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Stop using union rawinput in hw_input_t.
parent
c62ca2e1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
43 deletions
+40
-43
message.c
dlls/win32u/message.c
+5
-6
server_protocol.h
include/wine/server_protocol.h
+9
-2
protocol.def
server/protocol.def
+9
-2
queue.c
server/queue.c
+9
-9
trace.c
server/trace.c
+8
-24
No files found.
dlls/win32u/message.c
View file @
f86cca38
...
...
@@ -3549,15 +3549,14 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
{
case
WM_INPUT
:
case
WM_INPUT_DEVICE_CHANGE
:
req
->
input
.
hw
.
rawinput
.
type
=
rawinput
->
header
.
dwType
;
switch
(
rawinput
->
header
.
dwType
)
{
case
RIM_TYPEHID
:
req
->
input
.
hw
.
rawinput
.
hid
.
device
=
HandleToUlong
(
rawinput
->
header
.
hDevice
)
;
req
->
input
.
hw
.
rawinput
.
hid
.
param
=
rawinput
->
header
.
wParam
;
req
->
input
.
hw
.
rawinput
.
hid
.
usage
=
MAKELONG
(
hid_usage
,
hid_usage_page
);
req
->
input
.
hw
.
rawinput
.
hid
.
count
=
rawinput
->
data
.
hid
.
dwCount
;
req
->
input
.
hw
.
rawinput
.
hid
.
length
=
rawinput
->
data
.
hid
.
dwSizeHid
;
req
->
input
.
hw
.
wparam
=
rawinput
->
header
.
wParam
;
req
->
input
.
hw
.
hid
.
device
=
HandleToUlong
(
rawinput
->
header
.
hDevice
)
;
req
->
input
.
hw
.
hid
.
usage
=
MAKELONG
(
hid_usage
,
hid_usage_page
);
req
->
input
.
hw
.
hid
.
count
=
rawinput
->
data
.
hid
.
dwCount
;
req
->
input
.
hw
.
hid
.
length
=
rawinput
->
data
.
hid
.
dwSizeHid
;
wine_server_add_data
(
req
,
rawinput
->
data
.
hid
.
bRawData
,
rawinput
->
data
.
hid
.
dwCount
*
rawinput
->
data
.
hid
.
dwSizeHid
);
break
;
...
...
include/wine/server_protocol.h
View file @
f86cca38
...
...
@@ -343,8 +343,15 @@ typedef union
{
int
type
;
unsigned
int
msg
;
lparam_t
wparam
;
lparam_t
lparam
;
union
rawinput
rawinput
;
struct
{
unsigned
int
device
;
unsigned
int
usage
;
unsigned
int
count
;
unsigned
int
length
;
}
hid
;
}
hw
;
}
hw_input_t
;
...
...
@@ -6505,7 +6512,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 7
89
#define SERVER_PROTOCOL_VERSION 7
90
/* ### protocol_version end ### */
...
...
server/protocol.def
View file @
f86cca38
...
...
@@ -359,8 +359,15 @@ typedef union
{
int type; /* INPUT_HARDWARE */
unsigned int msg; /* message code */
lparam_t lparam; /* message param */
union rawinput rawinput;/* rawinput message data */
lparam_t wparam; /* parameters */
lparam_t lparam; /* parameters */
struct
{
unsigned int device; /* rawinput device index */
unsigned int usage; /* HID device usage */
unsigned int count; /* HID report count */
unsigned int length; /* HID report length */
} hid;
} hw;
} hw_input_t;
...
...
server/queue.c
View file @
f86cca38
...
...
@@ -2130,13 +2130,8 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
raw_msg
.
source
=
source
;
raw_msg
.
time
=
get_tick_count
();
raw_msg
.
message
=
input
->
hw
.
msg
;
if
(
input
->
hw
.
rawinput
.
type
==
RIM_TYPEHID
)
{
raw_msg
.
hid_report
=
get_req_data
();
report_size
=
input
->
hw
.
rawinput
.
hid
.
length
*
input
->
hw
.
rawinput
.
hid
.
count
;
}
raw_msg
.
hid_report
=
get_req_data
();
report_size
=
input
->
hw
.
hid
.
length
*
input
->
hw
.
hid
.
count
;
if
(
report_size
!=
get_req_data_size
())
{
set_error
(
STATUS_INVALID_PARAMETER
);
...
...
@@ -2144,8 +2139,13 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
}
msg_data
=
&
raw_msg
.
data
;
msg_data
->
size
=
sizeof
(
*
msg_data
)
+
report_size
;
msg_data
->
rawinput
=
input
->
hw
.
rawinput
;
msg_data
->
size
=
sizeof
(
*
msg_data
)
+
report_size
;
msg_data
->
rawinput
.
hid
.
type
=
RIM_TYPEHID
;
msg_data
->
rawinput
.
hid
.
device
=
input
->
hw
.
hid
.
device
;
msg_data
->
rawinput
.
hid
.
param
=
input
->
hw
.
wparam
;
msg_data
->
rawinput
.
hid
.
usage
=
input
->
hw
.
hid
.
usage
;
msg_data
->
rawinput
.
hid
.
count
=
input
->
hw
.
hid
.
count
;
msg_data
->
rawinput
.
hid
.
length
=
input
->
hw
.
hid
.
length
;
enum_processes
(
queue_rawinput_message
,
&
raw_msg
);
return
;
...
...
server/trace.c
View file @
f86cca38
...
...
@@ -421,29 +421,6 @@ static void dump_irp_params( const char *prefix, const irp_params_t *data )
}
}
static
void
dump_rawinput
(
const
char
*
prefix
,
const
union
rawinput
*
rawinput
)
{
switch
(
rawinput
->
type
)
{
case
RIM_TYPEMOUSE
:
fprintf
(
stderr
,
"%s{type=MOUSE,x=%d,y=%d,data=%08x}"
,
prefix
,
rawinput
->
mouse
.
x
,
rawinput
->
mouse
.
y
,
rawinput
->
mouse
.
data
);
break
;
case
RIM_TYPEKEYBOARD
:
fprintf
(
stderr
,
"%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}"
,
prefix
,
rawinput
->
kbd
.
message
,
rawinput
->
kbd
.
vkey
,
rawinput
->
kbd
.
scan
);
break
;
case
RIM_TYPEHID
:
fprintf
(
stderr
,
"%s{type=HID,device=%04x,param=%04x,usage=%04x:%04x,count=%u,length=%u}"
,
prefix
,
rawinput
->
hid
.
device
,
rawinput
->
hid
.
param
,
HIWORD
(
rawinput
->
hid
.
usage
),
LOWORD
(
rawinput
->
hid
.
usage
),
rawinput
->
hid
.
count
,
rawinput
->
hid
.
length
);
break
;
default:
fprintf
(
stderr
,
"%s{type=%04x}"
,
prefix
,
rawinput
->
type
);
break
;
}
}
static
void
dump_hw_input
(
const
char
*
prefix
,
const
hw_input_t
*
input
)
{
switch
(
input
->
type
)
...
...
@@ -463,12 +440,19 @@ static void dump_hw_input( const char *prefix, const hw_input_t *input )
break
;
case
INPUT_HARDWARE
:
fprintf
(
stderr
,
"%s{type=HARDWARE,msg=%04x"
,
prefix
,
input
->
hw
.
msg
);
dump_uint64
(
",wparam="
,
&
input
->
hw
.
wparam
);
dump_uint64
(
",lparam="
,
&
input
->
hw
.
lparam
);
switch
(
input
->
hw
.
msg
)
{
case
WM_INPUT
:
fprintf
(
stderr
,
"%s{type=HID,device=%04x,usage=%04x:%04x,count=%u,length=%u}"
,
prefix
,
input
->
hw
.
hid
.
device
,
HIWORD
(
input
->
hw
.
hid
.
usage
),
LOWORD
(
input
->
hw
.
hid
.
usage
),
input
->
hw
.
hid
.
count
,
input
->
hw
.
hid
.
length
);
break
;
case
WM_INPUT_DEVICE_CHANGE
:
dump_rawinput
(
",rawinput="
,
&
input
->
hw
.
rawinput
);
fprintf
(
stderr
,
"%s{type=HID,device=%04x,usage=%04x:%04x}"
,
prefix
,
input
->
hw
.
hid
.
device
,
HIWORD
(
input
->
hw
.
hid
.
usage
),
LOWORD
(
input
->
hw
.
hid
.
usage
)
);
break
;
}
fputc
(
'}'
,
stderr
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment