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
52a4d9e3
Commit
52a4d9e3
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: Tests clicking through window with SetWindowRgn.
parent
71201815
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
input.c
dlls/user32/tests/input.c
+33
-0
No files found.
dlls/user32/tests/input.c
View file @
52a4d9e3
...
...
@@ -3622,6 +3622,8 @@ static void test_SendInput_mouse_messages(void)
DWORD
thread_id
;
HANDLE
thread
;
HHOOK
hook
,
hook_setpos
,
hook_getpos
;
HRGN
hregion
;
RECT
region
;
POINT
pt
;
params
.
start_event
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
...
...
@@ -3921,6 +3923,8 @@ static void test_SendInput_mouse_messages(void)
ok_ne
(
0
,
old_other_proc
,
LONG_PTR
,
"%#Ix"
);
wait_messages
(
100
,
FALSE
);
ok_ret
(
ERROR
,
GetWindowRgnBox
(
other
,
&
region
)
);
SetWindowLongW
(
other
,
GWL_EXSTYLE
,
GetWindowLongW
(
other
,
GWL_EXSTYLE
)
|
WS_EX_LAYERED
);
ret
=
SetLayeredWindowAttributes
(
other
,
test
->
color
,
test
->
alpha
,
test
->
flags
);
...
...
@@ -3974,6 +3978,35 @@ static void test_SendInput_mouse_messages(void)
}
/* click on top-level window with SetWindowRgn called */
other
=
CreateWindowW
(
L"static"
,
NULL
,
WS_VISIBLE
|
WS_POPUP
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
NULL
,
NULL
);
ok_ne
(
NULL
,
hwnd
,
HWND
,
"%p"
);
wait_messages
(
100
,
FALSE
);
current_sequence_len
=
0
;
old_other_proc
=
SetWindowLongPtrW
(
other
,
GWLP_WNDPROC
,
(
LONG_PTR
)
append_message_wndproc
);
ok_ne
(
0
,
old_other_proc
,
LONG_PTR
,
"%#Ix"
);
hregion
=
CreateRectRgn
(
0
,
0
,
10
,
10
);
ok_ne
(
NULL
,
hregion
,
HRGN
,
"%p"
);
ok_ret
(
1
,
SetWindowRgn
(
other
,
hregion
,
TRUE
)
);
DeleteObject
(
hregion
);
ok_ret
(
SIMPLEREGION
,
GetWindowRgnBox
(
other
,
&
region
)
);
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
wait_messages
(
5
,
FALSE
);
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
;
ok_seq
(
button_up_hwnd
);
ok_ret
(
1
,
DestroyWindow
(
other
)
);
wait_messages
(
0
,
FALSE
);
/* warm up test case by moving cursor and window a bit first */
ok_ret
(
1
,
SetCursorPos
(
60
,
50
)
);
ok_ret
(
1
,
SetWindowPos
(
hwnd
,
NULL
,
10
,
0
,
0
,
0
,
SWP_NOSIZE
)
);
...
...
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