From 5577ff963e342078d8f8b96fc1adc4b175c8a250 Mon Sep 17 00:00:00 2001 From: tasn Date: Wed, 7 Sep 2011 10:41:44 +0000 Subject: [PATCH] Evas textblock: Added a workaround for the coords_recalc not being called. Please, when you fix this annoying issue, revert this terrible commit. This commit is intended to be a temporary fix. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@63267 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 96ba09b..ece813f 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -8751,6 +8751,17 @@ evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Ev if (b) *b = o->style_pad.b; } +/** @internal + * FIXME: DELETE ME! DELETE ME! + * This is an ugly workaround to get around the fact that + * evas_object_textblock_coords_recalc isn't really called when it's supposed + * to. When that bug is fixed please remove this. */ +static void +_workaround_object_coords_recalc(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +{ + evas_object_textblock_coords_recalc(obj); +} + /* all nice and private */ static void evas_object_textblock_init(Evas_Object *obj) @@ -8786,6 +8797,8 @@ evas_object_textblock_init(Evas_Object *obj) o = (Evas_Object_Textblock *)(obj->object_data); o->cursor->obj = obj; o->legacy_newline = EINA_TRUE; + evas_object_event_callback_priority_add(obj, EVAS_CALLBACK_RESIZE, -1000, + _workaround_object_coords_recalc, NULL); } static void * -- 2.7.4