Page MenuHomePhabricator

elm widgets which do not implement smart calculate cannot be manually calculated
Closed, ResolvedPublic


It used to be the case (as of 2013 when I originally wrote some code using it) that doing something like
evas_object_smart_need_recalculate_set(obj, 1);
on any elm widget would force a smart calc. This mechanic is still used internally in elementary and probably in some applications. It seems, however, that this no longer works on any elm widgets which do not implement their own smart calculate function, eg. elm_table. Attempting to do so for one of these widgets ends up calling in to the no-op _elm_widget_evas_object_smart_calculate() function and then returning without doing anything further.

zmike created this task.Nov 12 2015, 9:15 AM
zmike updated the task description. (Show Details)
zmike raised the priority of this task from to Normal.
zmike added a project: Restricted Project.
zmike added subscribers: zmike, JackDanielZ, tasn.

Hi Mike,

Are you sure about the 2013 year? What we did in 2013-2014 was to integrate the Eo files, without changing logic. In 2012, we had to integrate Eo inside EFL and that may have created issues.

I checked the code in Jan 2013 and by reading the code, table and widget seem to behave exactly as now, i.e widget implement a dumb function and table doesn't implement at all.

Are you sure it was working in this way before?


tasn added a subscriber: glima.Nov 16 2015, 7:28 AM

I just checked, it has nothing to do with Jack (DAMN!).
It seems to be a part of @glima's changes (happened at roughly the same time). Relevant commit (and probably before):
Author: Gustavo Lima Chaves <>
Date: Thu May 3 22:41:04 2012 +0000

zmike added a comment.Nov 16 2015, 2:14 PM

I've just realized that my timeline was irrelevant since the code originally did not use elementary; whether the elementary-powered version has ever worked correctly is questionable.

Will it be necessary for all widgets to implement their own smart calc function or is there an easier way?

tasn added a comment.Nov 17 2015, 3:27 AM

Honestly, I don't know. I don't remember the fine details of smart objects. Could you maybe try to add a super call in the empty noop function to see if it fixes your stuff.

What are you trying to achieve that doesn't work? (by smart calculating)

zmike added a comment.Nov 17 2015, 9:57 AM

I'm expecting that, for table, the inner evas table will smart calc.

I think potentially calling smart calc on the widget's resize object might be enough for a generic callback?

No idea what a super call is but I enjoy super calling smart calculate on things.

tasn added a comment.Nov 18 2015, 2:49 AM

Super call is eo_do_super, that is call the parent implementation. In this case, that would be the equivalent of not blocking the call so it doesn't propagate to the generic small callback.

You suggestion about the widget's resize object: maybe that could work, not sure about the implications. All of those seem reasonable.

I tried super calling, but it didn't seem to work. Manually calling smart calc on the resize object does work and resolve my issue (at least for elm_table), though I am also unsure of possible side effects.

tasn added a comment.Nov 19 2015, 3:53 AM

I think you may just have to fix issues as they come, that is, implement the correct function for table, and when needed in other widgets do it there.
I don't know if "resize object" is correct, I think it's just lucky in the case, but yeah, widgets need to pass it to their child widgets (how many there may be).

zmike added a comment.Nov 23 2015, 9:29 AM

Hm okay. I guess this ticket should remain open until the rest of the widgets get fixed so that it can be a known issue.

We could just do smart_calculate for resize obj in Elm_Widget.calculate() instead for all widgets?
But in some widget, resize object is not the theme object (e.g. elm notify, popup etcs)

understood why you did not add code into Elm_Widget.calculate().

conr2d added a subscriber: conr2d.Nov 30 2015, 8:57 AM
stefan_schmidt edited projects, added efl; removed Restricted Project.Jul 20 2016, 7:28 AM
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 7:00 AM
q66 edited projects, added efl: widgets; removed Restricted Project.Jun 11 2018, 7:59 AM
Herald closed this task as Resolved. · View Herald TranscriptJan 22 2019, 12:27 PM

Ho Ho Ho! This issue was fixed by Santa!

zmike changed the visibility from "All Users" to "Public (No Login Required)".Jan 22 2019, 12:27 PM