From bf0dd2cbcc83d91ef46301aa18bd5f0158b88d22 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 30 Dec 2010 12:49:41 +0000 Subject: [PATCH] test-text-field: Grab key focus on the first entry So that you can start typing right away. --- tests/interactive/test-text-field.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/interactive/test-text-field.c b/tests/interactive/test-text-field.c index 05b7195e4..948cd7b80 100644 --- a/tests/interactive/test-text-field.c +++ b/tests/interactive/test-text-field.c @@ -269,7 +269,7 @@ test_text_field_main (gint argc, gchar **argv) { ClutterActor *stage; - ClutterActor *box; + ClutterActor *box, *entry; ClutterLayoutManager *table; clutter_init (&argc, &argv); @@ -297,8 +297,9 @@ test_text_field_main (gint argc, "y-expand", FALSE, NULL); + entry = create_entry (CLUTTER_COLOR_LightGray, "some text", 0, 0); clutter_box_pack (CLUTTER_BOX (box), - create_entry (CLUTTER_COLOR_LightGray, "some text", 0, 0), + entry, "row", 0, "column", 1, "x-expand", TRUE, @@ -323,6 +324,7 @@ test_text_field_main (gint argc, "y-expand", FALSE, NULL); + clutter_actor_grab_key_focus (entry); clutter_actor_show (stage); clutter_main ();