summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-09-05 14:22:03 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-09-05 14:24:21 +0100
commita70808fb9643e95659582aced54e09555252afe7 (patch)
treeb2776ffa39d174f7c153749466bd5eb0d878b6da /src/lib/edje/edje_smart.c
parent04b0321bea1637539eff15c7759ab43991fe4d09 (diff)
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
Diffstat (limited to 'src/lib/edje/edje_smart.c')
-rw-r--r--src/lib/edje/edje_smart.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 16e4dbd..1777912 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)
466EAPI Eina_Bool 466EAPI Eina_Bool
467edje_object_file_set(Edje_Object *obj, const char *file, const char *group) 467edje_object_file_set(Edje_Object *obj, const char *file, const char *group)
468{ 468{
469 efl_file_unload(obj); 469 const char *cur_file = efl_file_get(obj);
470 const char *cur_group = efl_file_key_get(obj);
471
472 if (!(((file) && (cur_file) && (!strcmp(cur_file, file))) &&
473 ((group) && (cur_group) && (!strcmp(cur_group, group)))))
474 {
475 // We can't blindly unload here - this loses swallowed content (in
476 // swallows, boxes, tables etc.) ... this here along with an actual
477 // implementation of file unload broke the pager in E for starters
478 // as shading then unshading (double click titlebar) a window would
479 // lose the mini preview image obj swallowed in. also fullscreening
480 // would do it. this also broke gadget bar, the xkb gadget in it too
481 // and more... so this is a particularly bad thing break
482 efl_file_unload(obj);
483 }
470 return efl_file_simple_load(obj, file, group); 484 return efl_file_simple_load(obj, file, group);
471} 485}
472 486