Last-chance deactivation of MDI Child before destruction
dmitry at baikal.ru
Sun Nov 14 19:33:46 CST 2004
"Zach Gorman" <zach at archetypeauction.com> wrote:
> If, during destruction of an MDI child frame, the application
> re-activates the window that is about to be destroyed, de-activate
> it one last time.
> This resolves an obscure problem caused by a difference in Windows
> and Wine behavior. I have an MDI MFC app in which one of the MDI
> child frames forces itself to stay at the back of the Z-order by
> responding to MDI Activate messages, and re-activating the old
> window (yes I know this is nasty). When Wine tries to switch the
> active MDI child during the active child's destruction, this causes
> the about-to-be-destroyed window to become active again. Windows
> will issue one last WM_MDIACTIVATE to deactivate the window that
> will be destroyed in this case, but Wine won't. This patch corrects
> that difference in behavior.
What happens if that additional WM_MDIACTIVATE won't deactivate an MDI
child either, or an app doesn't allow deactivation for some reason?
Anyway, please add another MDI message test case showing what Windows
does in that case because your change is not obvious at all.
More information about the wine-devel