Commit Graph

18 Commits

Author SHA1 Message Date
Cedric BAIL 327593e9b4 elementary: rename Efl.Selection -> Efl.Ui.Selection as it is only usable with User Interface related element.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7505
2019-01-02 11:03:49 -08:00
Marcel Hollerbach 20ddd4c679 efl_app: introduce app_main for getting the app object
This brings in the possibility to receive the app object from bindings.
With the app object you can listen to pause / args / terminate / resume
events.

fix T7509

Differential Revision: https://phab.enlightenment.org/D7480
2018-12-20 12:56:54 +01:00
Marcel Hollerbach 66aa76ad89 efl_ui_dnd: fixup leaking inits and code duplication
In fff4d1ba97 one selection_manager_get
method was patched to behave like this, however, it completly broke the
fact of *only-one-manager* since the same code was duplicated in a other
files (efl_selection.c). This now unifies this code, and adds back the
assertion for only one manager per window.

Additionally a shutdown function is added, the app never destroyes, but
the selection manager decided to init some subsystems itself
(ecore_x for example). This lead to to a leak of init counts in ecore_x,
which lead to elementary test suite issues. This is now *finaly* fixed.

Differential Revision: https://phab.enlightenment.org/D7105
2018-10-02 16:13:13 +02:00
Carsten Haitzler a475b18961 efl ui dnd - further fixes on drop list data key handling
the efl ui dnd code didn't reset the drop list key to null (deleting
it) once it had freed the list of frop items. this also fixes another
issue in T7113 which causes crashes on exit.
2018-07-16 17:07:02 +09:00
Mike Blumenkrantz fff4d1ba97 efl/selection_manager: make selection manager a child of the app
Summary:
a selection manager is application-wide, not per-window. creating separate
managers for each window duplicates all callbacks for the window's display
server, guaranteeing broken behavior at any time when more than one window
exists

fix T6937

Reviewers: bu5hm4n, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6937

Differential Revision: https://phab.enlightenment.org/D6483
2018-07-03 12:39:26 -04:00
JongMin Lee 47caa0115a elm: resolve possible memory leak.
@fix
2018-04-20 16:45:50 +09:00
JongMin Lee c21ffd8735 elm: resolve possible memory leak.
@fix
2018-04-20 15:59:49 +09:00
JongMin Lee a07d729b2f elm: resolve possible memory leak.
@fix
2018-04-20 15:41:32 +09:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Shinwoo Kim 3cd2243028 Fix static analysis result
[Dereference after null check]

(1) src/lib/ecore/ecore_main.c
 - _efl_loop_handler_efl_object_finalize checks if pd->loop_data is NULL.
   After that, _handler_reset > _handler_clear > _ecore_main_fd_handler_del >
   _ecore_main_fdh_pool_del is directly dereferencing pd->pool_data.
 - _efl_loop_handler_efl_object_parent_set checks if pd->loop_data as well.
   Then it calls _handler_reset as well.

(2) src/lib/ecore_wayland/ecore_wl_dnd.c
  - ecore_wl_dnd_selection_set checks if t - result of wl_array_add - is NULL.
    And it is dereferecing t directly for wl_data_source_offer.

(3) src/lib/elementary/efl_ui_dnd.c
 - Third parameter const char *data could be NULL.
   In this case strlen dereferences NULL. The data should be non NULL value.
   I have checked this with Mr. Thiep Ha.

(4) src/lib/evas/canvas/evas_object_inform.c
 - _efl_canvas_object_efl_gfx_stack_stack_below checks if obj->layer is NULL.
   So it could call evas_object_inform_call_call_restack which is dereferencing
   obj->layer directly.
2018-04-05 19:40:57 +09:00
Carsten Haitzler 5db6b05187 elm - dont get top widget for non-ui objects 2018-02-13 15:21:49 +09:00
Carsten Haitzler 26833b8d28 efl ui did - dont segv if createicon func is not provided 2018-02-01 20:09:05 +09:00
Jean-Philippe Andre c91ae98fd3 cnp: Rename selection data to content
This solves an issue with C# bindings where a field of a struct can not
have the same name as the struct itself. Go figure why.
2018-01-18 18:46:15 +09:00
Thiep Ha 07e7bbd4b5 selection_dnd: fix warnings in clang
Fix warnings about type convert and vars init in clang and remove comments.
2018-01-16 16:35:14 +09:00
Boris Faure a8d2c6c42f elementary dnd: fix tautology 2018-01-15 21:30:28 +01:00
Thiep Ha e88bbaa1e3 cnp_dnd: make legacy APIs use new interfaces
Legacy APIs can uses efl_selection, efl_ui_dnd, efl_ui_dnd_container interfaces
with helper functions.
2018-01-11 17:56:24 +09:00
Thiep Ha 35339504b0 dnd: add efl_ui_dnd_container
efl_ui_dnd_container is the interface of dnd for container objects.
2018-01-11 17:56:24 +09:00
Thiep Ha e6ab4b41ed dnd: add efl_ui_dnd
Efl_Ui_Dnd is the interface for drag and drop of elm_cnp.
2018-01-11 17:56:24 +09:00