[gtk+/gtk-2-22] widget: more details on gtk_widget_grab_focus docs



commit e14bf989eb49122bc644040f2cdc38c9ce2ca2fa
Author: Stefan Kost <ensonic users sf net>
Date:   Wed Sep 1 15:13:09 2010 +0300

    widget: more details on gtk_widget_grab_focus docs
    
    Tell that widget needs to be mapped and realized.

 gtk/gtkwidget.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 947bc17..2bbd455 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5281,6 +5281,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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]