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
48f8db6c
Commit
48f8db6c
authored
Feb 13, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mouhid.sys: Send WM_POINTER* messages on contact updates.
parent
13f908b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
Makefile.in
dlls/mouhid.sys/Makefile.in
+1
-1
main.c
dlls/mouhid.sys/main.c
+19
-0
No files found.
dlls/mouhid.sys/Makefile.in
View file @
48f8db6c
MODULE
=
mouhid.sys
IMPORTS
=
ntoskrnl hidparse
IMPORTS
=
ntoskrnl hidparse
win32u
EXTRADLLFLAGS
=
-Wl
,--subsystem,native
SOURCES
=
\
...
...
dlls/mouhid.sys/main.c
View file @
48f8db6c
...
...
@@ -113,6 +113,8 @@ static NTSTATUS start_device_read( DEVICE_OBJECT *device )
static
void
add_contact
(
struct
device
*
impl
,
struct
list
*
old_contacts
,
ULONG
id
,
LONG
x
,
LONG
y
)
{
UINT
flags
=
POINTER_MESSAGE_FLAG_INRANGE
|
POINTER_MESSAGE_FLAG_INCONTACT
|
POINTER_MESSAGE_FLAG_CONFIDENCE
;
INPUT
input
=
{.
type
=
INPUT_HARDWARE
};
struct
contact
*
contact
;
LIST_FOR_EACH_ENTRY
(
contact
,
old_contacts
,
struct
contact
,
entry
)
...
...
@@ -120,6 +122,7 @@ static void add_contact( struct device *impl, struct list *old_contacts, ULONG i
if
(
&
contact
->
entry
!=
old_contacts
)
{
input
.
hi
.
uMsg
=
WM_POINTERUPDATE
;
list_remove
(
&
contact
->
entry
);
contact
->
pos
.
x
=
x
;
...
...
@@ -128,6 +131,9 @@ static void add_contact( struct device *impl, struct list *old_contacts, ULONG i
}
else
if
((
contact
=
calloc
(
1
,
sizeof
(
*
contact
)
)))
{
input
.
hi
.
uMsg
=
WM_POINTERDOWN
;
flags
|=
POINTER_MESSAGE_FLAG_NEW
;
contact
->
id
=
id
;
contact
->
pos
.
x
=
x
;
contact
->
pos
.
y
=
y
;
...
...
@@ -139,6 +145,10 @@ static void add_contact( struct device *impl, struct list *old_contacts, ULONG i
return
;
}
input
.
hi
.
wParamL
=
contact
->
id
;
input
.
hi
.
wParamH
=
flags
;
NtUserSendHardwareInput
(
0
,
0
,
&
input
,
MAKELPARAM
(
contact
->
pos
.
x
,
contact
->
pos
.
y
)
);
list_add_tail
(
&
impl
->
contacts
,
&
contact
->
entry
);
}
...
...
@@ -148,7 +158,16 @@ static void release_contacts( struct list *contacts )
LIST_FOR_EACH_ENTRY_SAFE
(
contact
,
next
,
contacts
,
struct
contact
,
entry
)
{
INPUT
input
=
{.
type
=
INPUT_HARDWARE
};
ULONG
flags
=
POINTER_MESSAGE_FLAG_CONFIDENCE
;
TRACE
(
"releasing contact %#lx, pos %s
\n
"
,
contact
->
id
,
wine_dbgstr_point
(
&
contact
->
pos
)
);
input
.
hi
.
uMsg
=
WM_POINTERUP
;
input
.
hi
.
wParamL
=
contact
->
id
;
input
.
hi
.
wParamH
=
flags
;
NtUserSendHardwareInput
(
0
,
0
,
&
input
,
MAKELPARAM
(
contact
->
pos
.
x
,
contact
->
pos
.
y
)
);
list_remove
(
&
contact
->
entry
);
free
(
contact
);
}
...
...
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