- as setting the cursor in a parent window also effects the
- windows above so that checking for the current cursor is
- not possible. */
-
- gdk_window_set_cursor( GTK_TOGGLE_BUTTON(m_widget)->event_window, cursor.GetCursor() );
+ as setting the cursor in a parent window also effects the
+ windows above so that checking for the current cursor is
+ not possible. */
+
+ gdk_window_set_cursor( event_window, cursor.GetCursor() );
+ }
+
+ if (g_delayedFocus == this)
+ {
+ if (GTK_WIDGET_REALIZED(m_widget))
+ {
+ gtk_widget_grab_focus( m_widget );
+ g_delayedFocus = NULL;
+ }