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
57b0cbff
Commit
57b0cbff
authored
Apr 28, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test for setting focus to an invisible window.
parent
c49b9485
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
win.c
dlls/user/tests/win.c
+25
-0
No files found.
dlls/user/tests/win.c
View file @
57b0cbff
...
...
@@ -1284,6 +1284,30 @@ static void test_children_zorder(HWND parent)
test_window_tree
(
parent
,
complex_style
,
complex_order_5
,
5
);
}
static
void
test_SetFocus
(
HWND
hwnd
)
{
HWND
child
;
/* check if we can set focus to non-visible windows */
ShowWindow
(
hwnd
,
SW_SHOW
);
SetFocus
(
0
);
SetFocus
(
hwnd
);
ok
(
GetFocus
()
==
hwnd
,
"Failed to set focus to visible window %p
\n
"
,
hwnd
);
ok
(
GetWindowLong
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
,
"Window %p not visible
\n
"
,
hwnd
);
ShowWindow
(
hwnd
,
SW_HIDE
);
SetFocus
(
0
);
SetFocus
(
hwnd
);
ok
(
GetFocus
()
==
hwnd
,
"Failed to set focus to invisible window %p
\n
"
,
hwnd
);
ok
(
!
(
GetWindowLong
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
),
"Window %p still visible
\n
"
,
hwnd
);
child
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_CHILD
,
0
,
0
,
0
,
0
,
hwnd
,
0
,
0
,
NULL
);
assert
(
child
);
SetFocus
(
child
);
ok
(
GetFocus
()
==
child
,
"Failed to set focus to invisible child %p
\n
"
,
child
);
ok
(
!
(
GetWindowLong
(
child
,
GWL_STYLE
)
&
WS_VISIBLE
),
"Child %p is visible
\n
"
,
child
);
DestroyWindow
(
child
);
}
START_TEST
(
win
)
{
pGetAncestor
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"user32.dll"
),
"GetAncestor"
);
...
...
@@ -1313,6 +1337,7 @@ START_TEST(win)
test_icons
();
test_SetWindowPos
(
hwndMain
);
test_SetMenu
(
hwndMain
);
test_SetFocus
(
hwndMain
);
test_children_zorder
(
hwndMain
);
...
...
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