-#if wxUSE_CONSTRAINTS
- if (GetAutoLayout())
- Layout();
-#endif
- int x = 0;
- int y = 0;
- int width, height;
- GetClientSize(&width, &height);
-
- if ( GetClientWindow() )
- GetClientWindow()->SetSize(x, y, width, height);
+ wxLogDebug(wxT("MDI PARENT=%p MacActivate(0x%08lx,%s)"),this,timestamp,activating?wxT("ACTIV"):wxT("deact"));
+ if(activating)
+ {
+ if(s_macDeactivateWindow && s_macDeactivateWindow->GetParent()==this)
+ {
+ wxLogDebug(wxT("child had been scheduled for deactivation, rehighlighting"));
+ UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->MacGetWindowRef(), true);
+ wxLogDebug(wxT("done highliting child"));
+ s_macDeactivateWindow = NULL;
+ }
+ else if(s_macDeactivateWindow == this)
+ {
+ wxLogDebug(wxT("Avoided deactivation/activation of this=%p"), this);
+ s_macDeactivateWindow = NULL;
+ }
+ else // window to deactivate is NULL or is not us or one of our kids
+ {
+ // activate kid instead
+ if(m_currentChild)
+ m_currentChild->MacActivate(timestamp,activating);
+ else
+ wxFrame::MacActivate(timestamp,activating);
+ }
+ }
+ else
+ {
+ // We were scheduled for deactivation, and now we do it.
+ if(s_macDeactivateWindow==this)
+ {
+ s_macDeactivateWindow = NULL;
+ if(m_currentChild)
+ m_currentChild->MacActivate(timestamp,activating);
+ wxFrame::MacActivate(timestamp,activating);
+ }
+ else // schedule ourselves for deactivation
+ {
+ if(s_macDeactivateWindow)
+ wxLogDebug(wxT("window=%p SHOULD have been deactivated, oh well!"),s_macDeactivateWindow);
+ wxLogDebug(wxT("Scheduling delayed MDI Parent deactivation"));
+ s_macDeactivateWindow = this;
+ }
+ }