evas: Fix automatic visible set (EO)
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 29 Aug 2017 01:55:56 +0000 (10:55 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 29 Aug 2017 01:55:56 +0000 (10:55 +0900)
This fixes a case where an object is hidden before the first render.
When called from elementary. the visible intercept code would be called
before evas object's visible_set, bypassing the line setting visible_set
to true.

As a consequence the object would be visible even when explicitly
requested as hidden.

Thanks @JackDanielZ for the report!

src/lib/evas/canvas/evas_object_intercept.c

index 2a37ac2..ae3adf0 100644 (file)
@@ -100,6 +100,7 @@ _evas_object_intercept_call_internal(Evas_Object *eo_obj,
      {
       case EVAS_OBJECT_INTERCEPT_CB_VISIBLE:
         i = !!va_arg(args, int);
+        if (!obj->legacy.visible_set) obj->legacy.visible_set = 1;
         if (i == obj->cur->visible) return 1;
         if (!obj->interceptors) return 0;
         if (i) blocked = evas_object_intercept_call_show(eo_obj, obj);