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
c5e16d20
Commit
c5e16d20
authored
Jan 26, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Filter the ll-hook messages with accept_message.
Wine sends spurious mouse move messages in some cases, let's ignore them as it makes tests unreliable otherwise.
parent
3724385c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
input.c
dlls/user32/tests/input.c
+11
-11
No files found.
dlls/user32/tests/input.c
View file @
c5e16d20
...
...
@@ -302,6 +302,9 @@ static void ok_seq_( const char *file, int line, const struct user_call *expecte
current_sequence_len
=
0
;
}
static
BOOL
append_message_hwnd
;
static
BOOL
(
*
p_accept_message
)(
UINT
msg
);
static
void
append_ll_hook_kbd
(
UINT
msg
,
const
KBDLLHOOKSTRUCT
*
info
)
{
struct
user_call
call
=
...
...
@@ -312,9 +315,12 @@ static void append_ll_hook_kbd( UINT msg, const KBDLLHOOKSTRUCT *info )
.
flags
=
info
->
flags
,
.
extra
=
info
->
dwExtraInfo
}
};
if
(
!
p_accept_message
||
p_accept_message
(
msg
))
{
ULONG
index
=
InterlockedIncrement
(
&
current_sequence_len
)
-
1
;
ok
(
index
<
ARRAY_SIZE
(
current_sequence
),
"got %lu calls
\n
"
,
index
);
current_sequence
[
index
]
=
call
;
}
}
static
void
append_ll_hook_ms
(
UINT
msg
,
const
MSLLHOOKSTRUCT
*
info
)
...
...
@@ -327,13 +333,14 @@ static void append_ll_hook_ms( UINT msg, const MSLLHOOKSTRUCT *info )
.
time
=
info
->
time
,
.
extra
=
info
->
dwExtraInfo
}
};
if
(
!
p_accept_message
||
p_accept_message
(
msg
))
{
ULONG
index
=
InterlockedIncrement
(
&
current_sequence_len
)
-
1
;
ok
(
index
<
ARRAY_SIZE
(
current_sequence
),
"got %lu calls
\n
"
,
index
);
current_sequence
[
index
]
=
call
;
}
}
static
BOOL
append_message_hwnd
;
static
BOOL
(
*
p_accept_message
)(
UINT
msg
);
static
void
append_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
if
(
!
p_accept_message
||
p_accept_message
(
msg
))
...
...
@@ -3536,13 +3543,6 @@ static void test_SendInput_mouse_messages(void)
WIN_MSG
(
WM_LBUTTONDOWN
,
(
HWND
)
-
1
/*hwnd*/
,
0x1
,
MAKELONG
(
50
,
50
),
.
todo
=
TRUE
),
{
0
},
};
struct
user_call
button_down_hwnd_todo_attached
[]
=
{
MS_HOOK
(
WM_LBUTTONDOWN
,
50
,
50
),
WIN_MSG
(
WM_LBUTTONDOWN
,
(
HWND
)
-
1
/*hwnd*/
,
0x1
,
MAKELONG
(
50
,
50
),
.
todo
=
TRUE
),
{.
todo
=
TRUE
/* spurious message on Wine */
},
{
0
},
};
struct
user_call
button_up_hwnd
[]
=
{
MS_HOOK
(
WM_LBUTTONUP
,
50
,
50
),
...
...
@@ -3793,8 +3793,8 @@ static void test_SendInput_mouse_messages(void)
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
wait_messages
(
5
,
FALSE
);
button_down_hwnd
_todo_attached
[
1
].
message
.
hwnd
=
hwnd
;
ok_seq
(
button_down_hwnd
_todo_attached
);
button_down_hwnd
[
1
].
message
.
hwnd
=
hwnd
;
ok_seq
(
button_down_hwnd
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
wait_messages
(
5
,
FALSE
);
button_up_hwnd
[
1
].
message
.
hwnd
=
hwnd
;
...
...
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