+void wxWindowGTK::RealizeTabOrder()
+{
+ if (m_wxwindow)
+ {
+ if ( !m_children.empty() )
+ {
+ // we don't only construct the correct focus chain but also use
+ // this opportunity to update the mnemonic widgets for the widgets
+ // that need them
+
+ GList *chain = NULL;
+ wxWindowGTK* mnemonicWindow = NULL;
+
+ for ( wxWindowList::const_iterator i = m_children.begin();
+ i != m_children.end();
+ ++i )
+ {
+ wxWindowGTK *win = *i;
+
+ if ( mnemonicWindow )
+ {
+ if ( win->AcceptsFocusFromKeyboard() )
+ {
+ // wxComboBox et al. needs to focus on on a different
+ // widget than m_widget, so if the main widget isn't
+ // focusable try the connect widget
+ GtkWidget* w = win->m_widget;
+ if ( !GTK_WIDGET_CAN_FOCUS(w) )
+ {
+ w = win->GetConnectWidget();
+ if ( !GTK_WIDGET_CAN_FOCUS(w) )
+ w = NULL;
+ }
+
+ if ( w )
+ {
+ mnemonicWindow->GTKWidgetDoSetMnemonic(w);
+ mnemonicWindow = NULL;
+ }
+ }
+ }
+ else if ( win->GTKWidgetNeedsMnemonic() )
+ {
+ mnemonicWindow = win;
+ }
+
+ chain = g_list_prepend(chain, win->m_widget);
+ }
+
+ chain = g_list_reverse(chain);
+
+ gtk_container_set_focus_chain(GTK_CONTAINER(m_wxwindow), chain);
+ g_list_free(chain);
+ }
+ else // no children
+ {
+ gtk_container_unset_focus_chain(GTK_CONTAINER(m_wxwindow));
+ }
+ }
+}
+
+void wxWindowGTK::Raise()
+{
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
+ if (m_wxwindow && m_wxwindow->window)
+ {
+ gdk_window_raise( m_wxwindow->window );
+ }
+ else if (m_widget->window)
+ {
+ gdk_window_raise( m_widget->window );
+ }
+}
+
+void wxWindowGTK::Lower()
+{
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
+ if (m_wxwindow && m_wxwindow->window)
+ {
+ gdk_window_lower( m_wxwindow->window );
+ }
+ else if (m_widget->window)
+ {
+ gdk_window_lower( m_widget->window );
+ }
+}
+
+bool wxWindowGTK::SetCursor( const wxCursor &cursor )
+{
+ wxCHECK_MSG( (m_widget != NULL), false, wxT("invalid window") );
+
+ if (cursor == m_cursor)
+ return false;
+
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
+ if (cursor == wxNullCursor)
+ return wxWindowBase::SetCursor( *wxSTANDARD_CURSOR );
+ else
+ return wxWindowBase::SetCursor( cursor );
+}
+
+void wxWindowGTK::WarpPointer( int x, int y )
+{
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
+ // We provide this function ourselves as it is