hermet pushed a commit to branch evas-1.7.

commit 482fa176c36b8f2e37936ce9635c5176ead9313c
Author: ChunEon Park <[email protected]>
Date:   Tue Apr 16 03:09:29 2013 +0900

    Evas: If an object goes to be hidden without replacing the cur/prev state 
info, the object context can be corrupted at the next show time. Now it 
replaces the cur/prev in that rare case.
---
 ChangeLog                    |  5 +++++
 NEWS                         |  1 +
 src/lib/canvas/evas_render.c | 29 +++++++++++++++++++++--------
 3 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f61ad3a..330dbba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1277,3 +1277,8 @@
         * Evas textblock: Fixed a bug with deletion of ranges that end just
        before a visual format.
 
+2013-04-15  ChunEon Park
+        * Evas: If an object goes to be hidden without replacing the cur/prev
+        state info, the object context can be corrupted at the next show time.
+        Now it replaces the cur/prev in that rare case.
+
diff --git a/NEWS b/NEWS
index 41ff236..5814e47 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Fixes:
    * Evas map: don't be crashed even if image size is 0.
    * Evas: Don't update evas update area by the clipper if the image obj 
visible is changed.
    * Evas textblock: Fixed a bug with deletion of ranges that end just before 
a visual format.
+    * Evas: If an object goes to be hidden without replacing the cur/prev 
state info, the object context can be corrupted at the next show time. Now it 
replaces the cur/prev in that rare case.
 
 Evas 1.7.6
 
diff --git a/src/lib/canvas/evas_render.c b/src/lib/canvas/evas_render.c
index 234f3ce..1036285 100644
--- a/src/lib/canvas/evas_render.c
+++ b/src/lib/canvas/evas_render.c
@@ -383,17 +383,30 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object 
*obj,
           }
         else
           {
-             if ((is_active) && (!obj->clip.clipees) &&
-                 _evas_render_is_relevant(obj))
+             if ((!obj->clip.clipees) && _evas_render_is_relevant(obj))
                {
-                  RDI(level);
-                  RD("      relevant + active\n");
-                  if (obj->restack)
-                    eina_array_push(restack_objects, obj);
+                  if (is_active)
+                    {
+                       RDI(level);
+                       RD("      relevant + active\n");
+                       if (obj->restack)
+                         eina_array_push(restack_objects, obj);
+                       else
+                         {
+                            eina_array_push(render_objects, obj);
+                            obj->render_pre = EINA_TRUE;
+                         }
+                    }
                   else
                     {
-                       eina_array_push(render_objects, obj);
-                       obj->render_pre = EINA_TRUE;
+                       /* It goes to be hidden. Prev caching should be replaced
+                          by the current (hidden) state. */
+                       if (evas_object_is_visible(obj) !=
+                           evas_object_was_visible(obj))
+                         evas_object_cur_prev(obj);
+
+                       RDI(level);
+                       RD("      skip - not smart, not active or clippees or 
not relevant\n");
                     }
                }
              else

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to