win: Add a little hack to fix E's logout/shutdown dialogs

E creates an edje object, sets it as resize_object, calls
restricted_calc and sets the resulting min size to the window.
But the window min size isn't taken into account when sizing
it, as the window sizes itself. I have no idea how this could
work before my changes.

E never actually requested the edje object to update its size
hints, so the window is left with an object of min size 0x0.

This patch is clearly a hack, but I can't really figure out
what would be the best or proper solution. Other elementary
widgets and containers seem to force edje object's update_hints.

Reproduction case: In E, menu, system, logout.
This commit is contained in:
Jean-Philippe Andre 2016-11-29 18:20:10 +09:00
parent 2102ed9b7c
commit a3d2960270
1 changed files with 4 additions and 0 deletions

View File

@ -7656,6 +7656,10 @@ elm_win_resize_object_add(Eo *obj, Evas_Object *subobj)
ret = elm_widget_sub_object_add(obj, subobj);
ret &= (evas_object_box_append(sd->legacy.box, subobj) != NULL);
// Little hack for E (edje object set as resize object... but never updated)
if (efl_isa(subobj, EDJE_OBJECT_CLASS))
edje_object_update_hints_set(subobj, 1);
if (!ret)
ERR("could not add sub object %p to window %p", subobj, obj);
}