Handle the case when an active MDI child is being hidden
Dmitry Timoshkov
dmitry at baikal.ru
Wed Oct 6 09:05:41 CDT 2004
Hello,
with my last patch I introduced a regression with frame menu handling
when last maximized MDI child gets destroyed. Here is a better fix for
that problem.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Handle the case when an active MDI child is being hidden.
--- cvs/hq/wine/windows/mdi.c 2004-10-06 16:14:50.000000000 +0900
+++ wine/windows/mdi.c 2004-10-06 22:57:38.000000000 +0900
@@ -527,8 +527,6 @@ static LRESULT MDIDestroyChild( HWND par
HWND next = MDI_GetWindow(ci, child, TRUE, 0);
if (next)
MDI_SwitchActiveChild(ci, next);
- else
- ci->hwndActiveChild = 0; /* nothing to activate */
}
for (i = 0; i < ci->nActiveChildren; i++)
@@ -1458,8 +1456,19 @@ LRESULT WINAPI DefMDIChildProcW( HWND hw
case WM_SHOWWINDOW:
case WM_SETVISIBLE:
- if (IsZoomed(ci->hwndActiveChild)) ci->mdiFlags &= ~MDIF_NEEDUPDATE;
- else MDI_PostUpdate(client, ci, SB_BOTH+1);
+ if (hwnd == ci->hwndActiveChild)
+ {
+ if (IsZoomed(hwnd))
+ {
+ if (!wParam)
+ MDI_RestoreFrameMenu( GetParent(client), hwnd );
+
+ ci->mdiFlags &= ~MDIF_NEEDUPDATE;
+ }
+ else MDI_PostUpdate(client, ci, SB_BOTH+1);
+
+ if (!wParam) ci->hwndActiveChild = 0;
+ }
break;
case WM_SIZE:
More information about the wine-patches
mailing list