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
3a934e73
Commit
3a934e73
authored
Jun 27, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a test for focus behaviour on minimize/restore.
parent
864384e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
win.c
dlls/user32/tests/win.c
+36
-0
No files found.
dlls/user32/tests/win.c
View file @
3a934e73
...
...
@@ -2164,9 +2164,23 @@ static void test_vis_rgn( HWND hwnd )
ReleaseDC
(
hwnd
,
hdc
);
}
static
LRESULT
WINAPI
set_focus_on_activate_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
{
if
(
msg
==
WM_ACTIVATE
&&
LOWORD
(
wp
)
==
WA_ACTIVE
)
{
HWND
child
=
GetWindow
(
hwnd
,
GW_CHILD
);
ok
(
child
!=
0
,
"couldn't find child window
\n
"
);
SetFocus
(
child
);
ok
(
GetFocus
()
==
child
,
"Focus should be on child %p
\n
"
,
child
);
return
0
;
}
return
DefWindowProc
(
hwnd
,
msg
,
wp
,
lp
);
}
static
void
test_SetFocus
(
HWND
hwnd
)
{
HWND
child
;
WNDPROC
old_wnd_proc
;
/* check if we can set focus to non-visible windows */
...
...
@@ -2213,6 +2227,28 @@ static void test_SetFocus(HWND hwnd)
ok
(
GetFocus
()
==
child
,
"Focus should still be on child %p
\n
"
,
child
);
EnableWindow
(
hwnd
,
TRUE
);
ok
(
GetActiveWindow
()
==
hwnd
,
"parent window %p should be active
\n
"
,
hwnd
);
ShowWindow
(
hwnd
,
SW_SHOWMINIMIZED
);
ok
(
GetActiveWindow
()
==
hwnd
,
"parent window %p should be active
\n
"
,
hwnd
);
todo_wine
ok
(
GetFocus
()
!=
child
,
"Focus should not be on child %p
\n
"
,
child
);
ok
(
GetFocus
()
!=
hwnd
,
"Focus should not be on parent %p
\n
"
,
hwnd
);
ShowWindow
(
hwnd
,
SW_RESTORE
);
ok
(
GetActiveWindow
()
==
hwnd
,
"parent window %p should be active
\n
"
,
hwnd
);
ok
(
GetFocus
()
==
hwnd
,
"Focus should be on parent %p
\n
"
,
hwnd
);
ShowWindow
(
hwnd
,
SW_SHOWMINIMIZED
);
ok
(
GetActiveWindow
()
==
hwnd
,
"parent window %p should be active
\n
"
,
hwnd
);
ok
(
GetFocus
()
!=
child
,
"Focus should not be on child %p
\n
"
,
child
);
todo_wine
ok
(
GetFocus
()
!=
hwnd
,
"Focus should not be on parent %p
\n
"
,
hwnd
);
old_wnd_proc
=
(
WNDPROC
)
SetWindowLongPtr
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
set_focus_on_activate_proc
);
ShowWindow
(
hwnd
,
SW_RESTORE
);
ok
(
GetActiveWindow
()
==
hwnd
,
"parent window %p should be active
\n
"
,
hwnd
);
todo_wine
ok
(
GetFocus
()
==
child
,
"Focus should be on child %p, not %p
\n
"
,
child
,
GetFocus
()
);
SetWindowLongPtr
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
old_wnd_proc
);
DestroyWindow
(
child
);
}
...
...
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