forked from enlightenment/enlightenment
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
This commit is contained in:
parent
752360e0c0
commit
4c7b798b45
|
@ -297,7 +297,28 @@ e_pixmap_free(E_Pixmap *cp)
|
||||||
if (!cp) return 0;
|
if (!cp) return 0;
|
||||||
if (--cp->refcount) return cp->refcount;
|
if (--cp->refcount) return cp->refcount;
|
||||||
e_pixmap_image_clear(cp, EINA_FALSE);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue