]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
[ 1936700 ] wxCAL_SHOW_WEEK_NUMBERS, slightly modified
[wxWidgets.git] / src / msw / toplevel.cpp
index d0e47ea963779007705bf202e56f843aff7608f3..f87a9827358e98aedce67319b35455759fd780bf 100644 (file)
@@ -507,9 +507,6 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
 {
     bool ret wxDUMMY_INITIALIZE(false);
 
-    // init our fields
-    Init();
-
     wxSize sizeReal = size;
     if ( !sizeReal.IsFullySpecified() )
     {
@@ -1178,49 +1175,14 @@ bool wxTopLevelWindowMSW::CanSetTransparent()
 
 void wxTopLevelWindowMSW::DoFreeze()
 {
-    if ( IsShown() )
-    {
-        for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
-              node;
-              node = node->GetNext() )
-        {
-            wxWindow *child = node->GetData();
-            if ( child->IsTopLevel() )
-                continue;
-
-            child->Freeze();
-        }
-    }
+    // do nothing: freezing toplevel window causes paint and mouse events
+    // to go through it any TLWs under it, so the best we can do is to freeze
+    // all children -- and wxWindowBase::Freeze() does that
 }
 
 void wxTopLevelWindowMSW::DoThaw()
 {
-    if ( IsShown() )
-    {
-        for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
-              node;
-              node = node->GetNext() )
-        {
-            wxWindow *child = node->GetData();
-            if ( child->IsTopLevel() )
-                continue;
-
-            child->Thaw();
-        }
-    }
-}
-
-
-void wxTopLevelWindowMSW::AddChild(wxWindowBase *child)
-{
-    // adding a child while frozen will assert when thawn, so freeze it as if
-    // it had been already present when we were frozen
-    if ( child && !child->IsTopLevel() && IsFrozen() )
-    {
-        child->Freeze();
-    }
-
-    wxTopLevelWindowBase::AddChild(child);
+    // intentionally empty -- see DoFreeze()
 }
 
 
@@ -1236,7 +1198,7 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
     {
         // restore focus to the child which was last focused unless we already
         // have it
-        wxLogTrace(_T("focus"), _T("wxTLW %08x activated."), (int) m_hWnd);
+        wxLogTrace(_T("focus"), _T("wxTLW %p activated."), m_hWnd);
 
         wxWindow *winFocus = FindFocus();
         if ( !winFocus || wxGetTopLevelParent(winFocus) != this )
@@ -1269,10 +1231,9 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
         }
 
         wxLogTrace(_T("focus"),
-                   _T("wxTLW %08x deactivated, last focused: %08x."),
-                   (int) m_hWnd,
-                   (int) (m_winLastFocused ? GetHwndOf(m_winLastFocused)
-                                           : NULL));
+                   _T("wxTLW %p deactivated, last focused: %p."),
+                   m_hWnd,
+                   m_winLastFocused ? GetHwndOf(m_winLastFocused) : NULL);
 
         event.Skip();
     }