+//-----------------------------------------------------------------------------
+// "switch_page"
+//-----------------------------------------------------------------------------
+
+static void gtk_mdi_page_change_callback(GtkNotebook *WXUNUSED(widget),
+ GtkNotebookPage *WXUNUSED(page),
+ gint WXUNUSED(page),
+ wxMDIParentFrame *parent )
+{
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
+ wxMDIChildFrame *child = parent->GetActiveChild();
+
+ if (!child) return;
+
+ wxActivateEvent event( wxEVT_ACTIVATE, TRUE, child->GetId() );
+ event.SetEventObject( child);
+ child->GetEventHandler()->ProcessEvent( event );
+}
+