]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/auibook.cpp
added missing headers for PCH-less compilation
[wxWidgets.git] / src / aui / auibook.cpp
index 607722c11549a4ff85b87efc5fe43fd0ce253ade..cfeaa264a67c35ecc779853cbfd23c74da6e817d 100644 (file)
@@ -2898,7 +2898,7 @@ void wxAuiNotebook::InitNotebook(long style)
 wxAuiNotebook::~wxAuiNotebook()
 {
     // Indicate we're deleting pages
-    m_isBeingDeleted = true;
+    SendDestroyEvent();
 
     while ( GetPageCount() > 0 )
         DeletePage(0);
@@ -3440,6 +3440,21 @@ void wxAuiNotebook::SetSelectionToWindow(wxWindow *win)
     const int idx = m_tabs.GetIdxFromWindow(win);
     wxCHECK_RET( idx != wxNOT_FOUND, _T("invalid notebook page") );
 
+
+    // since a tab was clicked, let the parent know that we received
+    // the focus, even if we will assign that focus immediately
+    // to the child tab in the SetSelection call below
+    // (the child focus event will also let wxAuiManager, if any,
+    // know that the notebook control has been activated)
+    
+    wxWindow* parent = GetParent();
+    if (parent)
+    {
+        wxChildFocusEvent eventFocus(this);
+        parent->GetEventHandler()->ProcessEvent(eventFocus);
+    }
+
+
     SetSelection(idx);
 }