aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-07-19 01:58:00 +0900
committerMike Blumenkrantz <zmike@samsung.com>2018-08-02 10:08:34 -0400
commit600a739f9134eb3541e19c2e4c35a86848c7b8eb (patch)
tree1363d3c628cb5b6c85c458a30f1a10da3fb12956
parente randr screen setup - fix disabling of scale checkbox (diff)
downloadenlightenment-600a739f9134eb3541e19c2e4c35a86848c7b8eb.tar.gz
e wl - fix e pixmap tracking to remove from both aliases and pixmaps
on pixmap free only the pixmaps entry was deleted not the pixmaps hash one. this led to lookup of stale pixmaps in the aliases hash... and then a crash. also use the correct local type with the correct byte order as well. this has probably been an issue for a while but now internal windows should work much better without crashes. @fix
-rw-r--r--src/bin/e_pixmap.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 346b2726a..4c667757c 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -297,7 +297,28 @@ e_pixmap_free(E_Pixmap *cp)
if (!cp) return 0;
if (--cp->refcount) return cp->refcount;
e_pixmap_image_clear(cp, EINA_FALSE);
- eina_hash_del_by_key(pixmaps[cp->type], &cp->win);
+ switch (cp->type)
+ {
+ case E_PIXMAP_TYPE_X:
+#ifndef HAVE_WAYLAND_ONLY
+ {
+ Ecore_X_Window xwin = cp->win;
+ eina_hash_del_by_key(pixmaps[cp->type], &xwin);
+ eina_hash_del_by_key(aliases[cp->type], &xwin);
+ }
+#endif
+ break;
+ case E_PIXMAP_TYPE_WL:
+#ifdef HAVE_WAYLAND
+ {
+ int64_t id = cp->win;
+ eina_hash_del_by_key(pixmaps[cp->type], &id);
+ eina_hash_del_by_key(aliases[cp->type], &id);
+ }
+#endif
+ break;
+ default: break;
+ }
return 0;
}