+ if (!m_clientWindow) return (wxMDIChildFrame*) NULL;
+
+ GtkNotebook *notebook = GTK_NOTEBOOK(m_clientWindow->m_widget);
+ if (!notebook) return (wxMDIChildFrame*) NULL;
+
+#if (GTK_MINOR_VERSION > 0)
+ gint i = gtk_notebook_get_current_page( notebook );
+#else
+ gint i = gtk_notebook_current_page( notebook );
+#endif
+ if (i < 0) return (wxMDIChildFrame*) NULL;
+
+ GtkNotebookPage* page = (GtkNotebookPage*) (g_list_nth(notebook->children,i)->data);
+ if (!page) return (wxMDIChildFrame*) NULL;
+
+ wxNode *node = m_clientWindow->GetChildren().First();
+ while (node)
+ {
+ wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
+ if (child_frame->m_page == page)
+ return child_frame;
+ node = node->Next();
+ }
+
+ return (wxMDIChildFrame*) NULL;