Grabbed the focus in the HildonTextView button press callback
authorAlejandro G. Castro <alex@igalia.com>
Thu, 16 Jul 2009 09:14:02 +0000 (11:14 +0200)
committerAlejandro G. Castro <alex@igalia.com>
Thu, 16 Jul 2009 09:14:02 +0000 (11:14 +0200)
* hildon/hildon-text-view.c,
(hildon_text_view_button_press_event): Grabbed the focus in button
press, this way we are sure the widget has the focus in the
release event, required for HIM.

Fixes: NB#121445 (Virtual keyboard opening is not working in same
way for each text entry field)

ChangeLog
hildon/hildon-text-view.c

index 9e8c7a8..0b331cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-16  Alejandro G. Castro  <alex@igalia.com>
+
+       * hildon/hildon-text-view.c,
+       (hildon_text_view_button_press_event): Grabbed the focus in button
+       press, this way we are sure the widget has the focus in the
+       release event, required for HIM.
+
+       Fixes: NB#121445 (Virtual keyboard opening is not working in same
+       way for each text entry field)
+
 2009-07-15  Alejandro Pinheiro <apinheiro@igalia.com>
 
        * hildon/hildon-pannable-area.[ch](hildon_pannable_area_set_focus_child)
index 4fb0086..62edec5 100644 (file)
@@ -244,6 +244,8 @@ hildon_text_view_button_press_event             (GtkWidget        *widget,
 {
     HildonTextViewPrivate *priv = HILDON_TEXT_VIEW_GET_PRIVATE (widget);
 
+    gtk_widget_grab_focus (widget);
+
     if (GTK_TEXT_VIEW (widget)->editable &&
         hildon_gtk_im_context_filter_event (GTK_TEXT_VIEW (widget)->im_context, (GdkEvent*)event)) {
         GTK_TEXT_VIEW (widget)->need_im_reset = TRUE;