... and others. this leads to crashes if x ops are busy in a thread or
engine evas thread shutdown happens to call engine calls that then do
x calls... should apply in general to wl too. fixes some segv's on
shutdown given the new gl thread patches.
@fix
Summary:
When text set NULL, size is not changed even text is removed.
So, fix that case logic
1. send text,hidden signal
2. remove text
3. call sizing eval to resize layout
Test Plan:
1. run elementary_test -to check
2. change value last check object
3. compare before and after
Reviewers: Jaehyun_Cho, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5086
Fake: This should never have had the fake_canvas_set API. It already can
not work after efl_finalize. And Ecore_Evas isn't part of EO API so it
doesn't make sense at this point to try to expose the fake window as
part of EO API.
Socket: This is the only type of window that implements socket_listen.
So we can just move this function to a new subclass.
NOTE: Socket & plug are currently broken, even in 1.20 (at least for me)!
Ref T5322
I'm not sure about the name for focus_allow:
- can_focus
- focusable
- focus_allow
- ???
Also, it looks like focus should just be the evas object function
overridden.
Ref T5363
This changes the name used in the config file, without changing the
system config files yet. This restores key bindings for:
- Win
- Image
- Video
- Photocam
See also the previous commit.
It was discussed a while ago that Zoomable was a poor name in some
languages, like python.
This changes, in Efl.Ui, to use underscores:
- Image.Zoomable
- Grid.Static
- Box.Flow
- Box.Stack
Zoom +/- doesn't work well as this is a multiplication factor.
Test scenario:
- elementary_test -to Photocam
Then click on the image, and press + or - on the keyboard.
@fix
This factorizes the code and makes most widgets handle key down events
in the same way:
- check that the object is not disabled, event is not on hold
- figure out the key binding based on the class name
- mark event as on hold
The class name is usually MY_CLASS_NAME but in some cases it was
MY_CLASS_NAME_LEGACY which may be different from the EO class name (eg.
elm_win vs. Efl.Ui.Win). In that case the key bindings are broken.
This breaks key bindings for the following widgets:
- Win (focus)
- Image ("clicked")
- Video (move, play)
This fixes key bindings for the following widgets:
- Nstate
Some widgets remain broken:
- Photocam / Efl.Ui.Image.Zoomable
A patch will be applied to restore the key bindings for the above
breaks.
This is an internal function that should probably become an overridable
protected method, as it's required for proper event handling in widgets.
Next step: use eo_event_info in the widgets implementations. Then remove
legacy event struct.
Ref T5363
Summary:
Some of locale formats convert as extension format.
For example,
uk_UA d_t_fmt is "%a, %d-%b-%Y %X %z".
The %X will convert as %T.
The %T format has to convert one more time to convert as %H:%M:%S.
ref : https://lh.2xlibre.net/locale/uk_UA/
We need to parse the format recursively to support that kind of case.
@fix
Test Plan:
Change the locale as uk_UA.
Run elementary_test -> datetime
See the time field is not appear.
Reviewers: jpeg, cedric
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5021
Test scenario: ephoto without a recent patch (47fe2b9ab03c151b0f4).
Before any further explanation, ephoto was definitely misusing the
aspect API here. A label most definitely shouldn't be sized based on an
aspect ratio, that's just crazy (you really want to make it as tall as
it's wide?)
If a box has an aspected item, it needs to run its min calc loop twice:
1. Once to determine the "true" min size in the direction of the box
(ie. in X in case of a horizontal box), and
2. Once more in order to apply the aspect ratio to aspected items and
augment the perpendicular min size (ie. Y for horizontal).
After that, it can go and layout the items based on the available size.
As we may guess from the above description (1) determines min W and
(2) determines min H (in horizontal mode).
BUT, there were two problems:
- The wrong item min size was used inside the 2nd loop (the code was
not symmetrical between horizontal and vertical modes). These are the
changes in _smart_extents_non_homogeneous_calc.
- The box min length was based on the actual size of aspected items,
rather than their min size. This goes against the observation. These
are the changes in _smart_extents_calculate.
Ref T5888
@fix
It seems that cc overlays that didn't change got lost in the process of
saving elm_config and then reloading it (automatically happens because
the file changed... which we just wrote to).
Fixes T3682
This only skips writing the profile name to
~/.elementary/config/profile.cfg
This allows easier testing of elementaryt apps (and E) with custom
profiles.
export ELM_PROFILE_NOSAVE=1
Issue: If the item has weight and non-filled align, item is not resized.
This patch fixes this issue.
Test: elementary_test -> ui.box -> Equal weight. Buttons Btn1, BtnA, B, C
do not resize when resize the window.
ref T5487
Summary:
when scroller can have focus and scroller's child can't have focus,
there is a problem that scroller is always selected to next focus object.
In this case, it should not enter into _elm_scroller_elm_widget_focus_direction()
Reviewers: woohyun
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5085
Summary:
int var devided by int is cast to double after devision.
This might cause wrong calculation result.
Reviewers: cedric, jpeg, Jaehyun_Cho
Reviewed By: Jaehyun_Cho
Differential Revision: https://phab.enlightenment.org/D5079
After any complex call on the window, a foreign evas/efl callback may be
triggered that could delete the window object. This leads to crashes in
queued jobs or even immediately after said callback (right now EO
prevents immediate memory free using eina_freeq or eina_trash so the
effects aren't immediate).
Funnily enough, this was a known issue according to some comments, but
no one bothered fixing it...
In this particular instance, a focus_out job was crashing while trying
to access now-invalid sd data.
I believe some uses of ELM_WIN_DATA_GET() may still be slightly unsafe
but most look like they should be the result of an EO call on the object
(eg. a call to efl_event_callback_call), which ensures the object is
alive.
Fixes T5869
it turns out to be very handy to have a interface for the moving and
border elements, that is unconnected to the way of how widgets are
registering themself.
This for example enables us to get a simple focus manager that just
redirects the call into a internal 2 dimensional data struct
This name makes more sense and one api does the job of two.
We never needed two apis at first place though.
Mark left/right_size_set as legacy apis too.
This patch also implements min_split_ratio on parts.
@feature
refer T5359
This allows user to set size hints to be respected and
request panes to ignore combined min size.
If this flag is set, the minimum size set by efl_gfx_size_hint_min_set()
is respected forcefully.
@feature
refer T5359
ctxpopup belongs to legacy, some work is ongoing to provide a cleaner EO
based API for popups, etc... See T5326
Revert "ctxpopup: implement Efl.Orientation interface functions"
This reverts commit 736fb9d498.
Ref T5870
Summary:
ctxpopup item have elm_list item internally.
item_part_content_unset need to pass on content part to elm_list item.
Test Plan:
1. launch elementary_test - ctxpopup
2. click Ctxpopup with part text & content function
3. press "Icon Set" and press "Icon Unset"
Reviewers: jpeg, woohyun, herb, Blackmole
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5018
Summary:
There were only 2 APIs (item_append, item_prepend) for ctxpopup item add.
Added more item add APIs (item_insert_before and item_insert_after) for convenience.
Test Plan:
1. launch elementary_test - ctxpopup
2. click Ctxpopup with callback function sample
3. check whether there are 3 items on ctxpopup
Reviewers: woohyun, Jaehyun, jpeg, cedric
Reviewed By: jpeg
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5004
Summary:
ctxpopup item have elm_list item internally.
But when elm_ctxpopup item was deleted, elm_list item was not deleted.
elm_list item in elm_ctxpopup item should be deleted in del_pre
when elm_ctxpopup item is deleted by elm_wdg_item_del()
Test Plan:
1. launch elementary_test - ctxpopup
2. click Ctxpopup with label only
3. "Never Show" item should not shown in ctxpopup
Reviewers: jpeg, cedric, woohyun
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5044
Revert "Separtor: use orientation APIs"
This reverts commit f043c3be61.
Separator is not part of EO API so no need to use Orientation or
Direction API here.
Ref T5870
This is only for EO obviously. style_set and theme_set should only be
called when the object is being created, not after. On-the-fly style
changes are complex to handle and in most cases it should be easy to
simply repopulate the object after creating a new one with a new style.
There are only a few cases where style_set is used long after creation
of an object, like changing how a label slides, or in the evas 3d map
examples. Menu seems to change the hover style a lot, so rewriting it in
pure EO would need some extra work, maybe.
Ref T5307
Ref T5363
I recently added an undef EAPI which wasn't in fact the best idea ever.
The EAPI needs to remain defined as is for elementary modules and
edje_externals.
Ping @vtorri
See ad6e3ce3df
This may solve issues on Windows where EAPI can be either dllimport or
dllexport. Anyway keeping EAPI defined is invalid and inconsistent.
Also, change an invalid EO_BETA_API define tag to EFL_BETA_API_SUPPORT
and EFL_EO_API_SUPPORT.
Thanks @vtorri for the report!
@fix
This removes an argument that was false only for a single widget:
naviframe. Hopefully this logic is now simpler, even though it involves
a small hack within naviframe itself.
Ref T5363
elm_widget APIs are internal only, even if they may be EAPI. The EAPI
here is for modules.
I believe this API is only required for layout objects, so simply should
remain in the layout class. Then you can do efl_isa() and call the
functions or accept error messages if you want to be more careless.
Ref T5363
Summary:
"_cursors_count" static variable is not used when Elementary is built
for Wayland. It should be removed if els_cursor doesn't use it.
@fix
Test Plan: N/A
Reviewers: raster, zmike, ManMower
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D5065
_elm_panel_efl_gfx_size_set() ends up calling
_elm_panel_elm_layout_sizing_eval() to adjust the layout
according to the updated width and height.
however, evas_object_geometr_get() doesn't return the updated values.
in fact, it is not necessary to call any API since the values are
stored as widget data in _elm_widget_efl_gfx_size_set().
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.
This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.
Ref T5315
This makes elm_layout implement:
- efl_canvas_layout_signal_message_send
- efl_canvas_layout_signal_process
This only transfers the calls from the elm widget to the internal
edje object.
PS: message_send is quite ugly in C...
Ref T5315
@feature
elm_layout_sizing_eval() marks an object as requiring recalc.
Unfortunately, it's been massively abused by various widgets into
actually doing the calc, or the min calc. So we end up with one API
that has 3 different definitions depending on the widget type:
1. Mark as requiring recalc (correct, respects doc, elm_layout)
2. Calculate min size and other size hints
3. Actually do some geometry modification
I believe we need to clarify these 3 requirements into 3 very clear
and specific APIs in elementary. Right now we have similar functions
in evas for 1 (evas_object_smart_changed) and 3 (smart_calculate).
But their exact definition also isn't necessarily what we want for
elementary.
Another clear problem is that layout_eval does not do any calculation
(in theory), so the "eval" word is a bit of a stretch here.
Once we're sure about the exact API we want, we can add this back to
EO and make it work across our EO widgets. For now let's just keep
the legacy API, and its EO overrides, as is.
Ref T5315
forcing a full eval here is unnecessary and broken since such an eval could
either change geometry in unexpected ways or fail to accurately change
the underlying canvas geometry
@fix