Commit Graph

26808 Commits

Author SHA1 Message Date
Marcel Hollerbach 94ef4bf9c3 efl_ui_pager: error when you try to delete something which unavailable
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8750
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 88cc86222e efl_ui_pager: redirect deleted objects to the top
otherwise we would not give up ownership of the widget

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8749
2019-05-01 16:17:25 -04:00
Marcel Hollerbach f1426fa2fc efl_ui_widget: error on NULL passing
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8747
2019-05-01 16:17:25 -04:00
Marcel Hollerbach a8b82f94d9 efl_ui_pager: ensure deletion behavior
when a object is unpacked, we should ensure that only elements are
deleted from the box when they are added.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8742
2019-05-01 16:17:25 -04:00
Marcel Hollerbach c62703a0d9 efl_ui_pager: provide a pack( implementation
this is needed in order to make efl_ui_pager complete.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8739
2019-05-01 16:17:25 -04:00
Wonki Kim ed2b2aa790 wl2_input: fix a problem that occurs in case of using both pointer/touch input devices
Summary:
if wl2_input logic gets a 'touch down' event from touch device,
input->focus.touch has set and it cause the logic handles every input as touch input
from that moment at _ecore_wl2_input_mouse_move_send function.
that is the reason why the patch(410c1f9587) has written for.

however, if there are multiple touch input devices,
clearing focus.touch variable without checking any conditions causes another problem.

I mean a case such as 'touch 1 down' -> 'touch 2 down' -> 'touch 1 up' -> 'touch 2 up'
at the moment 'touch 1 up' event executed, focus.touch would be cleared,
and 'touch 2 up' and following touch events will not be executed properly at the moment.

this patch counts a number of touch devices which are grabbing to clear focus.touch at proper time.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8787
2019-05-01 16:17:25 -04:00
Carsten Haitzler c3802e1e1d ecore drm2 - fix timeout in case case called from thread
so sw rendering make call ecore drm2 calls from a thread - i didnt
know that. so this makes my fix for gl hangs add hangs in sw as a
result. this fixes that. not perfect but better. do need refcoutnts on
outputs to be perfect...

also sometimes the commits fail so retry a few times...

this still leaves us wth another hang that is a separate issue.

@fix
2019-05-01 16:17:25 -04:00
Vincent Torri 6b7a9dc420 eina_unicode: return NULL if allocation fails
Reviewers: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8785
2019-05-01 16:17:25 -04:00
Christopher Michael 451c09bc83 ecore-wl2: Minor formatting fixes
NB: No functional changes
2019-05-01 16:17:25 -04:00
Christopher Michael 149b94c74c ecore-wl2: Minor formatting fixes
NB: No functional changes
2019-05-01 16:17:25 -04:00
Xavi Artigas 5858b4038e docs: Minor adjustments to Efl.Ui.Progressbar 2019-05-01 16:17:25 -04:00
Hermet Park b04569f93a evas png loader: optimize scale down logic.
Previously, mannual scale down logic was too primitive,
it copied pixel data each channels. Obviously, it's ineffective.

We know the general case - 4 bytes channel which is the most usage,
If loader copies data per four bytes, instructions could be reduced.

When I load scale-downed image(original 8k), about 0.02 secs was reduced by this.
2019-05-01 16:17:25 -04:00
Christopher Michael 50547a9cb1 elc_hoversel: Fix crash when no sd->last_location
As we cannot pass NULL to strcmp (crashes when we do), we should check
for a valid sd->last_location here in order to avoid crashing. This
was detected in Enlightenment Screen Settings dialog by selecting a
monitor in the hoversel drop down.

@fix
2019-05-01 16:17:25 -04:00
Cedric BAIL c4bd672195 eio: do not fail when the future has been cancelled properly.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8691
2019-05-01 16:17:25 -04:00
Cedric BAIL b85c087344 ecore: protect efl_model_properties_get from accesing NULL pointer when Model parent is not a Efl.BooleanModel.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8659
2019-05-01 16:17:25 -04:00
Cedric BAIL 50f9398202 ecore: fix efl_model_property_ready_get to actually return the right future when the data is not ready.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8658
2019-05-01 16:17:25 -04:00
Cedric BAIL 06c03e9b98 eina: allow copy of EINA_VALUE_EMPTY type.
This is usefule to allow timeout future to be propagated through eina_future_all
or eina_future_race for example.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8655
2019-05-01 16:17:25 -04:00
Xavi Artigas 829a438271 docs: Reword Efl.Container and family
Summary:
Avoid using "Item" since this is used by Grid and List items, or "Child" since
this is what Efl.Object uses.
Also clarify what each container does.

Test Plan: Only changes in docs. Everything still builds and passes tests.

Reviewers: bu5hm4n, cedric, zmike

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8720
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 633b14277b efl_ui_grid: do not delete a item that is not part of this container
otherwise we start to delete callbacks etc. on a widget that we do not
have.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8706
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 5464f9c548 efl_ui_grid: reparent deleted children
if a child is removed from grid, the parent should not be grid anymore.
Additionally, group members should also be removed, or random deletions
of widgets could happen.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8705
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 6045a958f0 efl_ui_grid: add an error to grid
grid only accepts grid items, not general widgets. If a wrong type is
passed in, a error should be printed.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8704
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 2f24743d15 efl_ui_grid: implement index behaviour of efl_pack
efl_pack defines behaviour for indexes greater and smaller than 0 and
the actaul size of items. With this commit the defined lange -count <->
count -1 now works as expected.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8703
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 642dc1fe85 efl_ui_grid: fixup pack APIs
the APIs in pack should only allow a single registeration of a item.
And when this item is registered, the parent should be set accordingly.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8702
2019-05-01 16:17:25 -04:00
Yeongjong Lee 4c89d5021b edje_calc: replace eina_stringshare_ref with eina_stringshare_add
Summary:
When there is circular dependency in edc, a bunch of CRI log is printed.
This patch fixes it.
```
ERR<10159>:edje lib/edje/edje_calc.c:3919 _edje_part_recalc() Circular dependency in the group 'test' : longpartname -> longpartname -> longpartname2
ERR<10159>:edje lib/edje/edje_calc.c:3896 _edje_part_recalc() Circular dependency when calculating part "longpartname". Already calculating XY [03] axes. Need to calculate Y [02] axes
CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ebf60 !!!
    Input handle is wrong type.
    Expected: 98761254 - Eina Stringshare Node
    Supplied: 2f736e6f - (unknown)

CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ec5d1 !!!
    Input handle is wrong type.
    Expected: 98761254 - Eina Stringshare Node
    Supplied: 5f747261 - (unknown)
```
If string is already stored, `eina_stringshare_add` increase its reference count.

Test Plan:
test.c
```
//edje_cc test.edc && gcc -o test test.c `pkg-config --libs --cflags elementary`
#include <Elementary.h>

int main(int argc, char **argv)
{
   elm_init(argc, argv);

   Evas_Object *win = elm_win_util_standard_add("test", "test");

   Evas_Object *layout = elm_layout_add(win);
   elm_layout_file_set(layout, "./test.edj", "test");
   elm_win_resize_object_add(win, layout);
   evas_object_show(layout);
   evas_object_resize(win, 200, 200);
   evas_object_show(win);

   elm_run();

   elm_shutdown();

   return 0;
}
```

test.edc
```
collections {
   group { name: "test";
      parts {
         rect { name: "longpartname";
            desc { "default";
                rel1.to: "longpartname2";
            }
         }
         rect { name: "longpartname2";
            type: RECT;
            desc { "default";
                rel2.to: "longpartname";
            }
         }
      }
   }
}
```

Reviewers: SanghyeonLee, zmike

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8717
2019-05-01 16:17:25 -04:00
Hosang Kim 57644b8d58 evas_events: fix grab count does not become 0 with proxy object.
Summary:
1. src_event_in should not be initialized when grabbed object exists.

2. when object of pointer grab is deleted and if object has proxy,
   proxy object of pointer grab should be deleted together.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8698
2019-05-01 16:17:25 -04:00
Woochanlee c3bc21bc24 elm_theme: Check the ref count to delete or unref.
Summary:
In case of the ref count bigger than 1.
That means the eo_theme ref count is 2.

In that case we need to call efl_unref when theme freed.
other case we can delete eo_theme.

@fix

Reviewers: Jaehyun_Cho, woohyun, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8714
2019-05-01 16:17:25 -04:00
Ali Alzyod 6d45e49698 evas: change way of searching for Escape strings/values in textblock
Instead of using old way for linear search for Escape Strings or Escape values, we will sort these values and string in compile time then binary search them.

In simple words:
Instead of having one array with pair of {escapeChar,escapeValue} and linear search it.
We will have two arrays with pair of {escapeChar,escapeValue}, one with escapeChar Sorted, and one with escapeValue sorted.
and we will use one of the array to binary search escape chars, and use the other to binary search escape values,

1- This will increase the speed for the search a lot for both Escape characters and Escape values.
2- Make code more easy to understand and trace
3- This will also fix bug for

```
int value;
const char * value = evas_textblock_string_escape_get("",&value)
//because of some unhanded case in previous code, this will return "&qout;" , which is first element in predefined escape character array
```

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8610
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 96599425f1 meson: do not use the variable name env in mono
env is used for the program env, and should not be used in any other
form here.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8690
2019-05-01 16:17:25 -04:00
Christopher Michael 9aaab0b017 ecore-evas-x: Fix double free
Coverity reports, and reading the code confirms, that the variable
'out' has already been freed (or is NULL) when reaching this line of
execution.

Fixes CID1382851

@fix
2019-05-01 16:17:25 -04:00
Yeongjong Lee b8904f38a5 ui.relative_layout: fix incorrect type casting
Summary: `temph` can be double type.

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8695
2019-05-01 16:17:25 -04:00
Yeongjong Lee 19d8e815cc ui.relative_layout: enhance relation_xxx_set,get apis
Summary:
I forgot `efl_pack_layout_request` after relation_xxx is changed.
Unnecessary register function in `relation_xxx_get` will return unexpected result.
if a object is not child of relative_layout, `relation_xxx_get` should return
`target = NULL` and `relative = 0.0` with error message.

Test Plan: make check

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8627
2019-05-01 16:17:25 -04:00
Yeongjong Lee 91accc3628 ui.relative_layout: add callbacks to update layout
Summary:
If the size or hints of a child changes, relative_layout need to update layout.
And, if a child is deleted, it should be unregisterd from relative_layout.

Depends on D8625

Test Plan: elementary_test -to 'efl.ui.relative_layout'

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8626
2019-05-01 16:17:25 -04:00
Yeongjong Lee a9394a6a5c ui.relative_layout: add internal clipper
Summary: If there is no clipper of container, color_set and clipper_set api won't work.

Test Plan:
1. elementary_test -to 'efl.ui.relative_layout'
2. Click button1
3. check that buttons color are changed.

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8625
2019-05-01 16:17:25 -04:00
Hermet Park 77fc0d9b83 evas x: code refactoring.
keep simple code as possible.
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 6548c36279 meson: ensure that buffer header is installed correctly
the directory it was installed to was <prefix>/include/evas/engine-1/
instead of <prefix>/include/evas-1/ which is wrong. This fixes
enlightenment building.

Reviewed-by: Lauro Neto <lauromauro_>
Differential Revision: https://phab.enlightenment.org/D8692
2019-05-01 16:17:25 -04:00
Jaehyun Cho d5fb149db2 efl_canvas_animation_player: fix to apply animation when player starts
Previously, animation was not applied immediately when player starts
animation because elapsed time is 0.
This caused flickering object if animation begins with alpha 0 because
the alpha 0 animation is not applied immediately.

Now, animation is applied immediately when player start animation.
2019-05-01 16:17:25 -04:00
Jaehyun Cho d79cc48fca efl_ui_stack: handle memory allocation fail
check if memory allocation succeeds and handle memory allocation fail.
2019-05-01 16:17:25 -04:00
Hermet Park 1fc732a1ec evas wbmp: fix wrong calc order.
Double check patch again, since my wrong logical thinking,
Every width must be considered to rounding up fiting 8 bits.
this new compuation must be correct.
2019-05-01 16:17:25 -04:00
Hermet Park c32e0e2ff3 evas wbmp loader: coming previous patch with fixing wrong calc.
Those bits must be rounded if they are not fit to 8 bits.

see: 68fe9ec6bf
2019-05-01 16:17:25 -04:00
Hermet Park 50ed660f27 Revert "evas-wbmp: revert previous two patches"
This reverts commit 0ebf41c003.
2019-05-01 16:17:25 -04:00
Cedric BAIL b5d565bed6 ecore: rely on event instead of creating one Eo object per future that need resolving.
This was a terrible oversight, but the point of having a small native type for future was
for making them efficient. Still we were using one Eo object for dispatching per future
to dispatch new value. I could have gathered all the dispatch with just one object, but
at the end we do have one object that notify us of the loop iteration... the loop object!
And we have event on that object that we can rely to trigger the dispatching of future
without requiring any additional object. So let's do that instead.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8567
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 0e99b33c39 efl_ui_scroller: fix Efl.Content implementation
this commit ensures the following:
- Delete content when new content is set
- Content set input validation
- Correct parent setting

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8682
2019-05-01 16:17:25 -04:00
Marcel Hollerbach cffe1ad99d efl_ui_tab_page: implement content_set / unset correctly
This patchset ensures that the following features are supported:
- content-widget deletion on set content
- content-widget validation on set calls
- invalid cases return false
- event emission

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8681
2019-05-01 16:17:25 -04:00
Marcel Hollerbach 710ecf5c63 efl_ui_popup: fix widget_parent inheritance
when you inherit from widget_parent, you MUST call the super function.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8680
2019-05-01 16:17:25 -04:00
Christopher Michael f893ef54d3 efl_core_command_line: Fix resource leak
Coverity reports that we leak the return from _escape(command) here,
so since we have to free the return from _escape, place it in it's own
variable that we can call free() on after we are done with it.

Fixes CID1399105

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8688
2019-05-01 16:17:25 -04:00
Lauro Moura 6dbf843afb csharp: Fix test code memory handling
Summary:
It was causing the test to crash when running in debug build.

Also some minor fixes cleaning up stuff when exiting.

Fixes T7792.

Reviewers: segfaultxavi, vitor.sousa

Reviewed By: segfaultxavi, vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7792

Differential Revision: https://phab.enlightenment.org/D8679
2019-05-01 16:17:25 -04:00
Boris Faure 5761778d6e fix compilation on alpine
Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8642
2019-05-01 16:17:25 -04:00
Christopher Michael ec1b51ef34 elput: Remove useless call to eldbus_message_unref
If we are returning here due to a failure to create the eldbus
message, then there is no point in trying to free it as it is already
null.

@fix
2019-05-01 16:17:25 -04:00
Christopher Michael 5e9b279dc1 elm_atspi_bridget: Fix resource leak
Coverity reports and 'req' leaks here so we need to unref the eldbus
message object if we are exiting this function.

Fixes CID1399424

@fix
2019-05-01 16:17:25 -04:00
Lauro Moura 32a332846a csharp: Fixes repeated method names.
Summary:
After D8397, interfaces have the I prefix again, so the "Do" prefix on
methods with repeated names may not be needed for them in most cases.

This commit also consolidates the method_managed_name calls with the
overload receiving attributes::function_def instead of plain name.

Fixes T7791

Depends on D8645

Reviewers: vitor.sousa, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7791

Differential Revision: https://phab.enlightenment.org/D8650
2019-05-01 16:17:25 -04:00