fix a bunch of breaks that having a blind file unload has brought

We can't blindly unload here - this loses swallowed content (in swallows,
boxes, tables etc.) ... this here along with an actual implementation of file
unload broke the pager in E for starters as shading then unshading (double
click titlebar) a window would lose the mini preview image obj swallowed in.
also fullscreening would do it. this also broke gadget bar, the xkb gadget in
it too and more... so this is a particularly bad thing break.

@fix
This commit is contained in:
Carsten Haitzler 2019-09-05 14:22:03 +01:00
parent 04b0321bea
commit a70808fb96
1 changed files with 15 additions and 1 deletions

View File

@ -466,7 +466,21 @@ edje_object_mmap_set(Edje_Object *obj, const Eina_File *file, const char *group)
EAPI Eina_Bool
edje_object_file_set(Edje_Object *obj, const char *file, const char *group)
{
efl_file_unload(obj);
const char *cur_file = efl_file_get(obj);
const char *cur_group = efl_file_key_get(obj);
if (!(((file) && (cur_file) && (!strcmp(cur_file, file))) &&
((group) && (cur_group) && (!strcmp(cur_group, group)))))
{
// We can't blindly unload here - this loses swallowed content (in
// swallows, boxes, tables etc.) ... this here along with an actual
// implementation of file unload broke the pager in E for starters
// as shading then unshading (double click titlebar) a window would
// lose the mini preview image obj swallowed in. also fullscreening
// would do it. this also broke gadget bar, the xkb gadget in it too
// and more... so this is a particularly bad thing break
efl_file_unload(obj);
}
return efl_file_simple_load(obj, file, group);
}