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
447e6477
Commit
447e6477
authored
May 18, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a couple of tests for SetActiveWindow.
parent
1cda8c77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
win.c
dlls/user/tests/win.c
+29
-0
No files found.
dlls/user/tests/win.c
View file @
447e6477
...
...
@@ -1607,6 +1607,34 @@ static void test_SetFocus(HWND hwnd)
DestroyWindow
(
child
);
}
static
void
test_SetActiveWindow
(
HWND
hwnd
)
{
HWND
hwnd2
;
ShowWindow
(
hwnd
,
SW_SHOW
);
SetActiveWindow
(
0
);
SetActiveWindow
(
hwnd
);
ok
(
GetActiveWindow
()
==
hwnd
,
"Failed to set focus to visible window %p
\n
"
,
hwnd
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOACTIVATE
|
SWP_HIDEWINDOW
);
ok
(
GetActiveWindow
()
==
hwnd
,
"Window %p no longer active
\n
"
,
hwnd
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOACTIVATE
|
SWP_SHOWWINDOW
);
ShowWindow
(
hwnd
,
SW_HIDE
);
ok
(
GetActiveWindow
()
!=
hwnd
,
"Window %p is still active
\n
"
,
hwnd
);
ShowWindow
(
hwnd
,
SW_SHOW
);
hwnd2
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
0
,
0
,
0
,
0
,
hwnd
,
0
,
0
,
NULL
);
ok
(
GetActiveWindow
()
==
hwnd2
,
"Window %p is not active
\n
"
,
hwnd2
);
DestroyWindow
(
hwnd2
);
ok
(
GetActiveWindow
()
!=
hwnd2
,
"Window %p is still active
\n
"
,
hwnd2
);
hwnd2
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
0
,
0
,
0
,
0
,
hwnd
,
0
,
0
,
NULL
);
ok
(
GetActiveWindow
()
==
hwnd2
,
"Window %p is not active
\n
"
,
hwnd2
);
SetWindowPos
(
hwnd2
,
0
,
0
,
0
,
0
,
0
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOACTIVATE
|
SWP_HIDEWINDOW
);
ok
(
GetActiveWindow
()
==
hwnd2
,
"Window %p no longer active (%p)
\n
"
,
hwnd2
,
GetActiveWindow
()
);
DestroyWindow
(
hwnd2
);
ok
(
GetActiveWindow
()
!=
hwnd2
,
"Window %p is still active
\n
"
,
hwnd2
);
}
START_TEST
(
win
)
{
pGetAncestor
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"user32.dll"
),
"GetAncestor"
);
...
...
@@ -1653,6 +1681,7 @@ START_TEST(win)
test_SetWindowPos
(
hwndMain
);
test_SetMenu
(
hwndMain
);
test_SetFocus
(
hwndMain
);
test_SetActiveWindow
(
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