+//-----------------------------------------------------------------------------
+// "realize" from m_widget
+//-----------------------------------------------------------------------------
+
+/* we cannot set colours, fonts and cursors before the widget has
+ been realized, so we do this directly after realization */
+
+static gint
+gtk_window_realized_callback( GtkWidget *widget, wxWindow *win )
+{
+ if (g_isIdle) wxapp_install_idle_handler();
+
+ if (win->m_font != *wxSWISS_FONT)
+ {
+ wxFont font( win->m_font );
+ win->m_font = wxNullFont;
+ win->SetFont( font );
+ }
+
+ if (win->m_backgroundColour != wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ))
+ {
+ wxColour bg( win->m_backgroundColour );
+ win->m_backgroundColour = wxNullColour;
+ win->SetBackgroundColour( bg );
+ }
+
+ if (win->m_foregroundColour != *wxBLACK)
+ {
+ wxColour fg( win->m_foregroundColour );
+ win->m_foregroundColour = wxNullColour;
+ win->SetForegroundColour( fg );
+ }
+
+ wxCursor cursor( win->m_cursor );
+ win->m_cursor = wxNullCursor;
+ win->SetCursor( cursor );
+
+ return FALSE;
+}
+