Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
87653d26
Commit
87653d26
authored
Sep 07, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix some assumption about absolute window positions.
parent
1bc6b962
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
win.c
dlls/user32/tests/win.c
+18
-10
No files found.
dlls/user32/tests/win.c
View file @
87653d26
...
...
@@ -10203,14 +10203,16 @@ static void window_from_point_proc(HWND parent)
child_static
=
CreateWindowExA
(
0
,
"static"
,
"static"
,
WS_CHILD
|
WS_VISIBLE
,
0
,
0
,
100
,
100
,
parent
,
0
,
NULL
,
NULL
);
ok
(
child_static
!=
0
,
"CreateWindowEx failed
\n
"
);
pt
.
x
=
pt
.
y
=
150
;
pt
.
x
=
pt
.
y
=
50
;
ClientToScreen
(
child_static
,
&
pt
);
win
=
WindowFromPoint
(
pt
);
ok
(
win
==
parent
,
"WindowFromPoint returned %p, expected %p
\n
"
,
win
,
parent
);
child_button
=
CreateWindowExA
(
0
,
"button"
,
"button"
,
WS_CHILD
|
WS_VISIBLE
,
100
,
0
,
100
,
100
,
parent
,
0
,
NULL
,
NULL
);
ok
(
child_button
!=
0
,
"CreateWindowEx failed
\n
"
);
pt
.
x
=
250
;
pt
.
x
=
pt
.
y
=
50
;
ClientToScreen
(
child_button
,
&
pt
);
win
=
WindowFromPoint
(
pt
);
ok
(
win
==
child_button
,
"WindowFromPoint returned %p, expected %p
\n
"
,
win
,
child_button
);
...
...
@@ -10243,7 +10245,7 @@ static void window_from_point_proc(HWND parent)
CloseHandle
(
end_event
);
}
static
void
test_window_from_point
(
const
char
*
argv0
)
static
void
test_window_from_point
(
HWND
main_window
,
const
char
*
argv0
)
{
HWND
hwnd
,
child
,
win
;
POINT
pt
;
...
...
@@ -10253,12 +10255,15 @@ static void test_window_from_point(const char *argv0)
HANDLE
start_event
,
end_event
;
hwnd
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
100
,
100
,
200
,
100
,
0
,
0
,
NULL
,
NULL
);
100
,
100
,
200
,
100
,
main_window
,
0
,
NULL
,
NULL
);
ok
(
hwnd
!=
0
,
"CreateWindowEx failed
\n
"
);
pt
.
x
=
pt
.
y
=
150
;
pt
.
x
=
pt
.
y
=
50
;
ClientToScreen
(
hwnd
,
&
pt
);
win
=
WindowFromPoint
(
pt
);
pt
.
x
=
250
;
pt
.
x
=
150
;
pt
.
y
=
50
;
ClientToScreen
(
hwnd
,
&
pt
);
if
(
win
==
hwnd
)
win
=
WindowFromPoint
(
pt
);
if
(
win
!=
hwnd
)
{
...
...
@@ -10270,7 +10275,8 @@ static void test_window_from_point(const char *argv0)
child
=
CreateWindowExA
(
0
,
"static"
,
"static"
,
WS_CHILD
|
WS_VISIBLE
,
0
,
0
,
100
,
100
,
hwnd
,
0
,
NULL
,
NULL
);
ok
(
child
!=
0
,
"CreateWindowEx failed
\n
"
);
pt
.
x
=
pt
.
y
=
150
;
pt
.
x
=
pt
.
y
=
50
;
ClientToScreen
(
hwnd
,
&
pt
);
win
=
WindowFromPoint
(
pt
);
ok
(
win
==
hwnd
,
"WindowFromPoint returned %p, expected %p
\n
"
,
win
,
hwnd
);
DestroyWindow
(
child
);
...
...
@@ -10298,11 +10304,13 @@ static void test_window_from_point(const char *argv0)
win
=
WindowFromPoint
(
pt
);
ok
(
win
==
child
,
"WindowFromPoint returned %p, expected %p
\n
"
,
win
,
child
);
simulate_click
(
150
,
150
);
simulate_click
(
pt
.
x
,
pt
.
y
);
flush_events
(
TRUE
);
child
=
GetWindow
(
child
,
GW_HWNDNEXT
);
pt
.
x
=
250
;
pt
.
x
=
150
;
pt
.
y
=
50
;
ClientToScreen
(
hwnd
,
&
pt
);
win
=
WindowFromPoint
(
pt
);
ok
(
win
==
child
,
"WindowFromPoint returned %p, expected %p
\n
"
,
win
,
child
);
...
...
@@ -13084,7 +13092,7 @@ START_TEST(win)
/* Add the tests below this line */
test_child_window_from_point
();
test_window_from_point
(
argv
[
0
]);
test_window_from_point
(
hwndMain
,
argv
[
0
]);
test_thick_child_size
(
hwndMain
);
test_fullscreen
();
test_hwnd_message
();
...
...
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