summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Kim <imfine98@gmail.com>2012-10-11 01:39:52 +0000
committerJihoon Kim <imfine98@gmail.com>2012-10-11 01:39:52 +0000
commit35529c84c065bfcd3d8817c29706db8a1de6928c (patch)
tree7a6fa1321eba50c35521e95814b2b97b678dc2ef
parentd4eb9e7fdef2ec34650a4e07ad81aac1f40fe986 (diff)
ecore: fix ecore_magic_fail error in ecore_imf_example.c
SVN revision: 77841
-rw-r--r--legacy/ecore/src/examples/ecore_imf_example.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/legacy/ecore/src/examples/ecore_imf_example.c b/legacy/ecore/src/examples/ecore_imf_example.c
index c2d02a0bec..f1db75723a 100644
--- a/legacy/ecore/src/examples/ecore_imf_example.c
+++ b/legacy/ecore/src/examples/ecore_imf_example.c
@@ -62,17 +62,25 @@ _entry_focus_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
62static void 62static void
63_canvas_focus_in_cb(void *data, Evas *e, void *event_info) 63_canvas_focus_in_cb(void *data, Evas *e, void *event_info)
64{ 64{
65 Entry *en;
65 Evas_Object *obj = evas_focus_get(e); 66 Evas_Object *obj = evas_focus_get(e);
66 if (obj) 67 if (!obj) return;
67 _entry_focus_in_cb(obj, NULL, NULL, NULL); 68
69 en = evas_object_data_get(obj, "Entry");
70 if (en)
71 _entry_focus_in_cb(en, NULL, NULL, NULL);
68} 72}
69 73
70static void 74static void
71_canvas_focus_out_cb(void *data, Evas *e, void *event_info) 75_canvas_focus_out_cb(void *data, Evas *e, void *event_info)
72{ 76{
77 Entry *en;
73 Evas_Object *obj = evas_focus_get(e); 78 Evas_Object *obj = evas_focus_get(e);
74 if (obj) 79 if (!obj) return;
75 _entry_focus_out_cb(obj, NULL, NULL, NULL); 80
81 en = evas_object_data_get(obj, "Entry");
82 if (en)
83 _entry_focus_out_cb(en, NULL, NULL, NULL);
76} 84}
77 85
78static void 86static void
@@ -399,6 +407,7 @@ create_input_field(Evas *evas, Entry *en, Evas_Coord x, Evas_Coord y, Evas_Coord
399 evas_object_move(en->rect, x, y); 407 evas_object_move(en->rect, x, y);
400 evas_object_resize(en->rect, w, h); 408 evas_object_resize(en->rect, w, h);
401 evas_object_show(en->rect); 409 evas_object_show(en->rect);
410 evas_object_data_set(en->rect, "Entry", en);
402 411
403 /* create text object for displaying text */ 412 /* create text object for displaying text */
404 en->txt_obj = evas_object_textblock_add(evas); 413 en->txt_obj = evas_object_textblock_add(evas);