e_comp_object: fix the comp object is shown even if ec is iconic 85/296685/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 6 Jul 2023 09:38:32 +0000 (18:38 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 3 Aug 2023 09:18:37 +0000 (09:18 +0000)
There is a bug that the comp object is shown when
client is set by iconic during showing animation.

1. client A is showing and begin animating of comp object
2. cw->animating is increased
3. e_client_iconify and _e_comp_intercept_hide is called
4. defer_hide is set
5. _e_comp_object_done_defer is called with "e,action,show,done"
6. the comp object is never hidden

for fixing this bug, call evas_object_hide when
_e_comp_object_done_defer is called with "e,action,show,done"
and defer_hide is set.

Change-Id: I7fdee04e208288ef06b4aaacb445a41ffd6e4d79

src/bin/e_comp_object.c

index 49f7d44..9df5c92 100644 (file)
@@ -1276,8 +1276,14 @@ _e_comp_object_done_defer(void *data, Evas_Object *obj EINA_UNUSED, const char *
    if (!_e_comp_object_animating_end(cw)) return;
    if (cw->animating) return;
    /* hide only after animation finishes to guarantee a full run of the animation */
-   if (cw->defer_hide && ((!strcmp(emission, "e,action,hide,done")) || (!strcmp(emission, "e,action,done"))))
-     evas_object_hide(cw->smart_obj);
+   if (!cw->defer_hide) return;
+   if ((!strcmp(emission, "e,action,hide,done")) ||
+       (!strcmp(emission, "e,action,done")) ||
+       ((cw->ec->iconic) && (!strcmp(emission, "e,action,show,done"))))
+     {
+        ELOGF("COMP", "defer hide emission:%s", cw->ec, emission);
+        evas_object_hide(cw->smart_obj);
+     }
 }
 
 /* run a visibility compositor effect if available, return false if object is dead */