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
132470a2
Commit
132470a2
authored
Oct 08, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly handle the case when last MDI child is being destroyed.
parent
cbf4c5c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
msg.c
dlls/user/tests/msg.c
+0
-0
mdi.c
windows/mdi.c
+27
-5
No files found.
dlls/user/tests/msg.c
View file @
132470a2
This diff is collapsed.
Click to expand it.
windows/mdi.c
View file @
132470a2
...
...
@@ -515,7 +515,7 @@ static void MDI_SwitchActiveChild( MDICLIENTINFO *ci, HWND hwndTo )
/**********************************************************************
* MDIDestroyChild
*/
static
LRESULT
MDIDestroyChild
(
HWND
par
ent
,
MDICLIENTINFO
*
ci
,
static
LRESULT
MDIDestroyChild
(
HWND
cli
ent
,
MDICLIENTINFO
*
ci
,
HWND
child
,
BOOL
flagDestroy
)
{
UINT
i
;
...
...
@@ -528,7 +528,15 @@ static LRESULT MDIDestroyChild( HWND parent, MDICLIENTINFO *ci,
if
(
next
)
MDI_SwitchActiveChild
(
ci
,
next
);
else
ci
->
hwndActiveChild
=
0
;
/* nothing to activate */
{
ShowWindow
(
child
,
SW_HIDE
);
if
(
IsZoomed
(
child
))
{
MDI_RestoreFrameMenu
(
GetParent
(
client
),
child
);
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
NULL
);
}
MDI_ChildActivate
(
client
,
0
);
}
}
for
(
i
=
0
;
i
<
ci
->
nActiveChildren
;
i
++
)
...
...
@@ -547,6 +555,8 @@ static LRESULT MDIDestroyChild( HWND parent, MDICLIENTINFO *ci,
}
}
SendMessageW
(
client
,
WM_MDIREFRESHMENU
,
0
,
0
);
if
(
flagDestroy
)
{
MDI_PostUpdate
(
GetParent
(
child
),
ci
,
SB_BOTH
+
1
);
...
...
@@ -561,7 +571,8 @@ static LRESULT MDIDestroyChild( HWND parent, MDICLIENTINFO *ci,
/**********************************************************************
* MDI_ChildActivate
*
* Called in response to WM_CHILDACTIVATE
* Called in response to WM_CHILDACTIVATE, or when last MDI child
* is being deactivated.
*/
static
LONG
MDI_ChildActivate
(
HWND
client
,
HWND
child
)
{
...
...
@@ -872,6 +883,8 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
TRACE
(
"frame %p,child %p,nIt=%d,iId=%d
\n
"
,
frame
,
hChild
,
nItems
,
iId
);
if
(
!
menu
)
return
0
;
/* if there is no system buttons then nothing to do */
if
(
!
(
iId
==
SC_RESTORE
||
iId
==
SC_CLOSE
)
)
return
0
;
...
...
@@ -1058,10 +1071,12 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
case
WM_MDICREATE
:
if
(
lParam
)
{
HWND
child
;
if
(
unicode
)
{
MDICREATESTRUCTW
*
csW
=
(
MDICREATESTRUCTW
*
)
lParam
;
return
(
LRESULT
)
CreateWindowExW
(
WS_EX_MDICHILD
,
csW
->
szClass
,
child
=
CreateWindowExW
(
WS_EX_MDICHILD
,
csW
->
szClass
,
csW
->
szTitle
,
csW
->
style
,
csW
->
x
,
csW
->
y
,
csW
->
cx
,
csW
->
cy
,
hwnd
,
0
,
csW
->
hOwner
,
...
...
@@ -1070,12 +1085,19 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
else
{
MDICREATESTRUCTA
*
csA
=
(
MDICREATESTRUCTA
*
)
lParam
;
return
(
LRESULT
)
CreateWindowExA
(
WS_EX_MDICHILD
,
csA
->
szClass
,
child
=
CreateWindowExA
(
WS_EX_MDICHILD
,
csA
->
szClass
,
csA
->
szTitle
,
csA
->
style
,
csA
->
x
,
csA
->
y
,
csA
->
cx
,
csA
->
cy
,
hwnd
,
0
,
csA
->
hOwner
,
(
LPVOID
)
csA
->
lParam
);
}
if
(
IsZoomed
(
ci
->
hwndActiveChild
))
{
MDI_AugmentFrameMenu
(
GetParent
(
hwnd
),
child
);
MDI_UpdateFrameText
(
GetParent
(
hwnd
),
hwnd
,
NULL
);
}
return
(
LRESULT
)
child
;
}
return
0
;
...
...
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