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
01a88ff0
Commit
01a88ff0
authored
Oct 05, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If there no MDI child to activate set hwndActiveChild to 0 in
WM_MDIDESTROY hander, add a test case.
parent
f2dca03d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
msg.c
dlls/user/tests/msg.c
+24
-0
mdi.c
windows/mdi.c
+4
-1
No files found.
dlls/user/tests/msg.c
View file @
01a88ff0
...
...
@@ -1522,6 +1522,7 @@ static BOOL mdi_RegisterWindowClasses(void)
static
void
test_mdi_messages
(
void
)
{
MDICREATESTRUCTA
mdi_cs
;
CLIENTCREATESTRUCT
client_cs
;
HWND
mdi_frame
,
mdi_child
,
mdi_child2
,
active_child
;
BOOL
zoomed
;
...
...
@@ -1807,6 +1808,29 @@ static void test_mdi_messages(void)
flush_sequence
();
/* end of test for maximized MDI children */
mdi_cs
.
szClass
=
"MDI_child_Class"
;
mdi_cs
.
szTitle
=
"MDI child"
;
mdi_cs
.
hOwner
=
GetModuleHandleA
(
0
);
mdi_cs
.
x
=
CW_USEDEFAULT
;
mdi_cs
.
y
=
CW_USEDEFAULT
;
mdi_cs
.
cx
=
CW_USEDEFAULT
;
mdi_cs
.
cy
=
CW_USEDEFAULT
;
mdi_cs
.
style
=
WS_CHILD
|
WS_VISIBLE
|
WS_MAXIMIZEBOX
;
mdi_cs
.
lParam
=
0
;
mdi_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDICREATE
,
0
,
(
LPARAM
)
&
mdi_cs
);
ok
(
mdi_child
!=
0
,
"MDI child creation failed
\n
"
);
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
active_child
==
mdi_child
,
"wrong active MDI child %p
\n
"
,
active_child
);
SendMessageA
(
mdi_client
,
WM_MDIDESTROY
,
(
WPARAM
)
mdi_child
,
0
);
ok
(
!
IsWindow
(
mdi_child
),
"MDI child should be destroyed
\n
"
);
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
!
active_child
,
"wrong active MDI child %p
\n
"
,
active_child
);
SetFocus
(
0
);
flush_sequence
();
DestroyWindow
(
mdi_client
);
ok_sequence
(
WmDestroyMDIclientSeq
,
"Destroy MDI client window"
,
FALSE
);
...
...
windows/mdi.c
View file @
01a88ff0
...
...
@@ -525,7 +525,10 @@ static LRESULT MDIDestroyChild( HWND parent, MDICLIENTINFO *ci,
if
(
child
==
ci
->
hwndActiveChild
)
{
HWND
next
=
MDI_GetWindow
(
ci
,
child
,
TRUE
,
0
);
MDI_SwitchActiveChild
(
ci
,
next
);
if
(
next
)
MDI_SwitchActiveChild
(
ci
,
next
);
else
ci
->
hwndActiveChild
=
0
;
/* nothing to activate */
}
for
(
i
=
0
;
i
<
ci
->
nActiveChildren
;
i
++
)
...
...
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