When some E_Client is deleted by hide event of its window,
comp_x tries to unset parent window of client's E_Pixmap.
This unsetting is causing freeing pixmap even if the pixmap is still pending.
this revision is for avoiding those unwanted free.
Change-Id: Id7568b57b4d274534915920c115ac59ae94e746e
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
EINA_SAFETY_ON_NULL_RETURN(cp);
if (cp->parent == win) return;
- e_pixmap_usable_set(cp, 0);
- e_pixmap_clear(cp);
+ switch (cp->type)
+ {
+ case E_PIXMAP_TYPE_X:
+#ifndef HAVE_WAYLAND_ONLY
+ e_pixmap_usable_set(cp, 0);
+ if (win) e_pixmap_clear(cp);
+ else ecore_x_e_comp_pixmap_set(cp->parent, 0);
+#endif
+ break;
+ case E_PIXMAP_TYPE_WL:
+#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+ e_pixmap_usable_set(cp, 0);
+ e_pixmap_clear(cp);
+#endif
+ break;
+ }
if (cp->parent)
eina_hash_set(pixmaps[cp->type], &cp->parent, NULL);