From fd732cda4c92d84a38a076d5e8dcb7c9fb53127f Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 13 Dec 2011 04:15:10 +0000 Subject: [PATCH] =?utf8?q?From:=20=EC=A0=95=EC=B0=AC=EC=9A=B1=20=20Subject:=20[E-devel]=20[Patch]=20elm=5Fgenlist?= =?utf8?q?=20pan=20changed=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch is to fix the problem that blinking is occured when application use the ecore timer and the rendering delay at pan resize/move using evas_object_smart_changed instead of ecore_job_add. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66132 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_genlist.c | 19 +++++++++++++++---- src/lib/elm_genlist.h | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 75b25fa..78514e2 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2628,7 +2628,7 @@ _pan_resize(Evas_Object *obj, if (sd->resize_job) ecore_job_del(sd->resize_job); sd->resize_job = ecore_job_add(_pan_resize_job, sd); } - sd->wd->pan_resized = EINA_TRUE; + sd->wd->pan_changed = EINA_TRUE; evas_object_smart_changed(obj); if (sd->wd->calc_job) ecore_job_del(sd->wd->calc_job); sd->wd->calc_job = NULL; @@ -2651,10 +2651,10 @@ _pan_calculate(Evas_Object *obj) if (!sd) return; evas_event_freeze(evas_object_evas_get(obj)); - if (sd->wd->pan_resized) + if (sd->wd->pan_changed) { _calc_job(sd->wd); - sd->wd->pan_resized = EINA_FALSE; + sd->wd->pan_changed = EINA_FALSE; } evas_object_geometry_get(obj, &ox, &oy, &ow, &oh); @@ -2705,8 +2705,11 @@ _pan_move(Evas_Object *obj, Pan *sd = evas_object_smart_data_get(obj); if (!sd) return; + + sd->wd->pan_changed = EINA_TRUE; + evas_object_smart_changed(obj); if (sd->wd->calc_job) ecore_job_del(sd->wd->calc_job); - sd->wd->calc_job = ecore_job_add(_calc_job, sd->wd); + sd->wd->calc_job = NULL; } static void @@ -3427,6 +3430,13 @@ _queue_process(Widget_Data *wd) { showme = _item_block_recalc(it->item->block, it->item->block->num, EINA_TRUE); it->item->block->changed = 0; + if(wd->pan_changed) + { + if (wd->calc_job) ecore_job_del(wd->calc_job); + wd->calc_job = NULL; + _calc_job(wd); + wd->pan_changed = EINA_FALSE; + } } if (showme) it->item->block->showme = EINA_TRUE; if (eina_inlist_count(wd->blocks) > 1) @@ -3870,6 +3880,7 @@ _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby) } } wd->clear_me = 0; + wd->pan_changed = EINA_TRUE; if (wd->calc_job) { ecore_job_del(wd->calc_job); diff --git a/src/lib/elm_genlist.h b/src/lib/elm_genlist.h index f22c84e..4499eaa 100644 --- a/src/lib/elm_genlist.h +++ b/src/lib/elm_genlist.h @@ -132,7 +132,7 @@ struct _Widget_Data Eina_Bool swipe : 1; Eina_Bool reorder_pan_move : 1; Eina_Bool auto_scroll_enabled : 1; - Eina_Bool pan_resized : 1; + Eina_Bool pan_changed : 1; Eina_Bool requeued : 1; /* this is set to EINA_TRUE when the item is re-queued. this happens when the item is un-queued but the rel item is still in the queue. this item will be processed later. */ struct { -- 2.7.4