diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index 16e4dbd7d8..1777912f49 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -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); }