]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/radiobut.cpp
corrected warnings when compiling with -Wall -W
[wxWidgets.git] / src / gtk1 / radiobut.cpp
index 7d2557692f253918ec960e18e6c11028d53d865e..92b78d42235c8f1200cbe60fa23d1a0c905f4b24 100644 (file)
@@ -31,8 +31,9 @@ extern bool g_isIdle;
 // data
 //-----------------------------------------------------------------------------
 
-extern bool       g_blockEventsOnDrag;
-extern wxCursor   g_globalCursor;
+extern bool           g_blockEventsOnDrag;
+extern wxCursor       g_globalCursor;
+extern wxWindowGTK   *g_delayedFocus;
 
 //-----------------------------------------------------------------------------
 // "clicked"
@@ -219,6 +220,15 @@ void wxRadioButton::OnInternalIdle()
        gdk_window_set_cursor( win, cursor.GetCursor() );
     }
 
+    if (g_delayedFocus == this)
+    {
+        if (GTK_WIDGET_REALIZED(m_widget))
+        {
+            gtk_widget_grab_focus( m_widget );
+            g_delayedFocus = NULL;
+        }
+    }
+
     UpdateWindowUI();
 }