From b4d7d5f49cfb64ffb9b484fb38dcad7bb18b363f Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Fri, 6 Mar 2015 10:26:04 +0900 Subject: [PATCH] Avoid freeing pixmap from unsetting parent window of pixmap 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 --- src/bin/e_pixmap.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index 1664c21311..744a329049 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -287,8 +287,22 @@ e_pixmap_parent_window_set(E_Pixmap *cp, Ecore_Window win) 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); -- 2.34.1