From 94420f7110ac1ef7de42997d24f94b876a87557b Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 1 Sep 2010 15:13:09 +0300 Subject: [PATCH] widget: more details on gtk_widget_grab_focus docs Tell that widget needs to be mapped and realized. --- gtk/gtkwidget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index d49041553b..e2b6e343c1 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -5163,6 +5163,10 @@ _gtk_widget_grab_notify (GtkWidget *widget, * * More precisely, it must have the %GTK_CAN_FOCUS flag set. Use * gtk_widget_set_can_focus() to modify that flag. + * + * The widget also needs to be realized and mapped. This is indicated by the + * related signals. Grabbing the focus immediately after creating the widget + * will likely fail and cause critical warnings. **/ void gtk_widget_grab_focus (GtkWidget *widget)