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
d8b8ac85
Commit
d8b8ac85
authored
Feb 15, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Generate WM_POINTERENTER / WM_POINTERLEAVE messages.
parent
5b833c83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
34 deletions
+24
-34
device8.c
dlls/dinput/tests/device8.c
+5
-25
queue.c
server/queue.c
+19
-9
No files found.
dlls/dinput/tests/device8.c
View file @
d8b8ac85
...
...
@@ -2004,7 +2004,6 @@ static void test_hid_touch_screen(void)
res
=
msg_wait_for_events
(
1
,
&
touchleave_event
,
500
);
todo_wine
ok
(
res
==
0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
todo_wine
ok
(
pointer_enter_count
==
1
,
"got pointer_enter_count %u
\n
"
,
pointer_enter_count
);
todo_wine
ok
(
pointer_up_count
==
1
,
"got pointer_up_count %u
\n
"
,
pointer_up_count
);
...
...
@@ -2012,13 +2011,10 @@ static void test_hid_touch_screen(void)
expect_flags
=
POINTER_MESSAGE_FLAG_PRIMARY
|
POINTER_MESSAGE_FLAG_CONFIDENCE
|
POINTER_MESSAGE_FLAG_FIRSTBUTTON
|
POINTER_MESSAGE_FLAG_NEW
|
POINTER_MESSAGE_FLAG_INRANGE
|
POINTER_MESSAGE_FLAG_INCONTACT
;
todo_wine
todo_wine
/* missing POINTER_MESSAGE_FLAG_FIRSTBUTTON */
ok
(
HIWORD
(
pointer_wparam
[
0
]
)
==
expect_flags
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
0
]
)
>
0
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_lparam
[
0
]
)
*
128
/
width
==
0x08
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
todo_wine
ok
(
HIWORD
(
pointer_lparam
[
0
]
)
*
128
/
height
==
0x10
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
id
=
LOWORD
(
pointer_wparam
[
0
]
);
...
...
@@ -2027,6 +2023,7 @@ static void test_hid_touch_screen(void)
ok
(
HIWORD
(
pointer_wparam
[
1
]
)
==
expect_flags
||
broken
(
HIWORD
(
pointer_wparam
[
1
]
)
==
(
expect_flags
&
~
POINTER_MESSAGE_FLAG_CONFIDENCE
)),
/* Win8 32bit */
"got wparam %#Ix
\n
"
,
pointer_wparam
[
1
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
1
]
)
==
id
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
1
]
);
todo_wine
ok
(
LOWORD
(
pointer_lparam
[
1
]
)
*
128
/
width
==
0x08
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
1
]
);
...
...
@@ -2141,20 +2138,16 @@ static void test_hid_touch_screen(void)
ok
(
res
==
0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
res
=
msg_wait_for_events
(
1
,
&
touchleave_event
,
10
);
ok
(
res
==
WAIT_TIMEOUT
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
todo_wine
ok
(
pointer_enter_count
==
1
,
"got pointer_enter_count %u
\n
"
,
pointer_enter_count
);
ok
(
pointer_up_count
==
0
,
"got pointer_up_count %u
\n
"
,
pointer_up_count
);
expect_flags
=
POINTER_MESSAGE_FLAG_PRIMARY
|
POINTER_MESSAGE_FLAG_CONFIDENCE
|
POINTER_MESSAGE_FLAG_FIRSTBUTTON
|
POINTER_MESSAGE_FLAG_NEW
|
POINTER_MESSAGE_FLAG_INRANGE
|
POINTER_MESSAGE_FLAG_INCONTACT
;
todo_wine
todo_wine
/* missing POINTER_MESSAGE_FLAG_FIRSTBUTTON */
ok
(
HIWORD
(
pointer_wparam
[
0
]
)
==
expect_flags
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
0
]
)
>
0
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_lparam
[
0
]
)
*
128
/
width
==
0x08
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
todo_wine
ok
(
HIWORD
(
pointer_lparam
[
0
]
)
*
128
/
height
==
0x10
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
ok
(
pointer_wparam
[
1
]
==
0
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
1
]
);
ok
(
pointer_lparam
[
1
]
==
0
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
1
]
);
...
...
@@ -2167,7 +2160,6 @@ static void test_hid_touch_screen(void)
bus_send_hid_input
(
file
,
&
desc
,
&
touch_release
,
sizeof
(
touch_release
)
);
res
=
msg_wait_for_events
(
1
,
&
touchleave_event
,
1000
);
todo_wine
ok
(
res
==
0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
res
=
msg_wait_for_events
(
1
,
&
touchdown_event
,
10
);
ok
(
res
==
WAIT_TIMEOUT
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
...
...
@@ -2178,7 +2170,6 @@ static void test_hid_touch_screen(void)
ok
(
HIWORD
(
pointer_wparam
[
0
]
)
==
expect_flags
||
broken
(
HIWORD
(
pointer_wparam
[
0
]
)
==
(
expect_flags
&
~
POINTER_MESSAGE_FLAG_CONFIDENCE
)),
/* Win8 32bit */
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
0
]
)
==
id
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
ok
(
LOWORD
(
pointer_lparam
[
0
]
)
*
128
/
width
==
0x08
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
ok
(
HIWORD
(
pointer_lparam
[
0
]
)
*
128
/
height
==
0x10
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
...
...
@@ -2197,34 +2188,27 @@ static void test_hid_touch_screen(void)
ok
(
res
==
0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
res
=
msg_wait_for_events
(
1
,
&
touchleave_event
,
10
);
ok
(
res
==
WAIT_TIMEOUT
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
todo_wine
ok
(
pointer_enter_count
==
2
,
"got pointer_enter_count %u
\n
"
,
pointer_enter_count
);
ok
(
pointer_up_count
==
0
,
"got pointer_up_count %u
\n
"
,
pointer_up_count
);
expect_flags
=
POINTER_MESSAGE_FLAG_PRIMARY
|
POINTER_MESSAGE_FLAG_CONFIDENCE
|
POINTER_MESSAGE_FLAG_FIRSTBUTTON
|
POINTER_MESSAGE_FLAG_NEW
|
POINTER_MESSAGE_FLAG_INRANGE
|
POINTER_MESSAGE_FLAG_INCONTACT
;
todo_wine
todo_wine
/* missing POINTER_MESSAGE_FLAG_FIRSTBUTTON */
ok
(
HIWORD
(
pointer_wparam
[
0
]
)
==
expect_flags
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
0
]
)
>
0
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_lparam
[
0
]
)
*
128
/
width
==
0x08
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
todo_wine
ok
(
HIWORD
(
pointer_lparam
[
0
]
)
*
128
/
height
==
0x10
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
id
=
LOWORD
(
pointer_wparam
[
0
]
);
expect_flags
=
POINTER_MESSAGE_FLAG_CONFIDENCE
|
POINTER_MESSAGE_FLAG_FIRSTBUTTON
|
POINTER_MESSAGE_FLAG_NEW
|
POINTER_MESSAGE_FLAG_INRANGE
|
POINTER_MESSAGE_FLAG_INCONTACT
;
todo_wine
todo_wine
/* missing POINTER_MESSAGE_FLAG_FIRSTBUTTON */
ok
(
HIWORD
(
pointer_wparam
[
1
]
)
==
expect_flags
||
broken
(
HIWORD
(
pointer_wparam
[
1
]
)
==
(
expect_flags
&
~
POINTER_MESSAGE_FLAG_CONFIDENCE
)),
/* Win8 32bit */
"got wparam %#Ix
\n
"
,
pointer_wparam
[
1
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
1
]
)
==
id
+
1
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
1
]
);
todo_wine
ok
(
LOWORD
(
pointer_lparam
[
1
]
)
*
128
/
width
==
0x18
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
1
]
);
todo_wine
ok
(
HIWORD
(
pointer_lparam
[
1
]
)
*
128
/
height
==
0x20
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
1
]
);
...
...
@@ -2234,10 +2218,8 @@ static void test_hid_touch_screen(void)
bus_send_hid_input
(
file
,
&
desc
,
&
touch_release
,
sizeof
(
touch_release
)
);
res
=
msg_wait_for_events
(
1
,
&
touchleave_event
,
1000
);
todo_wine
ok
(
res
==
0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
res
=
msg_wait_for_events
(
1
,
&
touchleave_event
,
1000
);
todo_wine
ok
(
res
==
0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
res
=
msg_wait_for_events
(
1
,
&
touchdown_event
,
10
);
ok
(
res
==
WAIT_TIMEOUT
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
...
...
@@ -2248,7 +2230,6 @@ static void test_hid_touch_screen(void)
ok
(
HIWORD
(
pointer_wparam
[
0
]
)
==
expect_flags
||
broken
(
HIWORD
(
pointer_wparam
[
0
]
)
==
(
expect_flags
&
~
POINTER_MESSAGE_FLAG_CONFIDENCE
)),
/* Win8 32bit */
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
0
]
)
==
id
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
0
]
);
ok
(
LOWORD
(
pointer_lparam
[
0
]
)
*
128
/
width
==
0x08
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
ok
(
HIWORD
(
pointer_lparam
[
0
]
)
*
128
/
height
==
0x10
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
0
]
);
...
...
@@ -2257,7 +2238,6 @@ static void test_hid_touch_screen(void)
ok
(
HIWORD
(
pointer_wparam
[
1
]
)
==
expect_flags
||
broken
(
HIWORD
(
pointer_wparam
[
1
]
)
==
(
expect_flags
&
~
POINTER_MESSAGE_FLAG_CONFIDENCE
)),
/* Win8 32bit */
"got wparam %#Ix
\n
"
,
pointer_wparam
[
1
]
);
todo_wine
ok
(
LOWORD
(
pointer_wparam
[
1
]
)
==
id
+
1
,
"got wparam %#Ix
\n
"
,
pointer_wparam
[
1
]
);
ok
(
LOWORD
(
pointer_lparam
[
1
]
)
*
128
/
width
==
0x18
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
1
]
);
ok
(
HIWORD
(
pointer_lparam
[
1
]
)
*
128
/
height
==
0x20
,
"got lparam %#Ix
\n
"
,
pointer_lparam
[
1
]
);
...
...
server/queue.c
View file @
d8b8ac85
...
...
@@ -2229,10 +2229,17 @@ struct pointer
static
void
queue_pointer_message
(
struct
pointer
*
pointer
)
{
static
const
unsigned
int
messages
[][
2
]
=
{
{
WM_POINTERUPDATE
,
0
},
{
WM_POINTERENTER
,
WM_POINTERDOWN
},
{
WM_POINTERUP
,
WM_POINTERLEAVE
},
};
struct
hw_msg_source
source
=
{
IMDT_UNAVAILABLE
,
IMDT_TOUCH
};
struct
desktop
*
desktop
=
pointer
->
desktop
;
const
hw_input_t
*
input
=
&
pointer
->
input
;
unsigned
int
wparam
=
input
->
hw
.
wparam
;
unsigned
int
i
,
wparam
=
input
->
hw
.
wparam
;
timeout_t
time
=
get_tick_count
();
user_handle_t
win
=
pointer
->
win
;
rectangle_t
top_rect
;
struct
message
*
msg
;
...
...
@@ -2244,16 +2251,19 @@ static void queue_pointer_message( struct pointer *pointer )
if
(
pointer
->
primary
)
wparam
|=
POINTER_MESSAGE_FLAG_PRIMARY
<<
16
;
if
(
!
(
msg
=
alloc_hardware_message
(
0
,
source
,
get_tick_count
(),
0
)))
return
;
for
(
i
=
0
;
i
<
2
&&
messages
[
input
->
hw
.
msg
-
WM_POINTERUPDATE
][
i
];
i
++
)
{
if
(
!
(
msg
=
alloc_hardware_message
(
0
,
source
,
time
,
0
)))
return
;
msg
->
win
=
get_user_full_handle
(
win
);
msg
->
msg
=
input
->
hw
.
msg
;
msg
->
wparam
=
wparam
;
msg
->
lparam
=
MAKELONG
(
x
,
y
);
msg
->
x
=
desktop
->
cursor
.
x
;
msg
->
y
=
desktop
->
cursor
.
y
;
msg
->
win
=
get_user_full_handle
(
win
);
msg
->
msg
=
messages
[
input
->
hw
.
msg
-
WM_POINTERUPDATE
][
i
]
;
msg
->
wparam
=
wparam
;
msg
->
lparam
=
MAKELONG
(
x
,
y
);
msg
->
x
=
desktop
->
cursor
.
x
;
msg
->
y
=
desktop
->
cursor
.
y
;
queue_hardware_message
(
desktop
,
msg
,
1
);
queue_hardware_message
(
desktop
,
msg
,
1
);
}
if
(
input
->
hw
.
msg
==
WM_POINTERUP
)
{
...
...
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