diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2018-07-12 09:33:29 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2018-07-12 09:33:38 -0400 |
commit | 92820dbb884c707b59749d98d58f75b535fcf33e (patch) | |
tree | f99d6012207d06ec4cede40749a1a97b3cb82df9 | |
parent | 1de1f6d8fb4674f5ea419548a276173f00f12ad7 (diff) | |
download | efl-92820dbb884c707b59749d98d58f75b535fcf33e.tar.gz |
elm_fileselector: move to focus compostition
Summary:
elm_fileselector was using efl_ui_widget_state_apply to call for internal chain update.
This internal chain update was relying on efl_ui_focus_object_manager_get, which
results in a wrong value at this time, since the value is still the old one and not the
current one. (This behaviour will be updated after the release). Focus composition
solves this issue by not relying on the properties of efl.ui.focus_object, but rather
take the values from the configuration in the state_apply call.
fix T6147
fix T7105
Reviewers: zmike, stefan_schmidt, segfaultxavi, devilhorns, herdsman
Reviewed By: zmike
Subscribers: herdsman, cedric, #committers
Tags: #efl
Maniphest Tasks: T7105, T6147
Differential Revision: https://phab.enlightenment.org/D6552
-rw-r--r-- | src/lib/elementary/elc_fileselector.c | 15 | ||||
-rw-r--r-- | src/lib/elementary/elm_fileselector.eo | 3 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index e618de0b63..94abf68a82 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -13,6 +13,7 @@ #define EFL_ACCESS_WIDGET_ACTION_PROTECTED #define ELM_INTERFACE_FILESELECTOR_BETA #define EFL_PART_PROTECTED +#define EFL_UI_FOCUS_COMPOSITION_PROTECTED #include <Elementary.h> #include "Eio_Eo.h" @@ -104,7 +105,7 @@ _focus_chain_update(Eo *obj, Elm_Fileselector_Data *pd) { Eina_List *tmp = NULL; -#define A(p) tmp = eina_list_append(tmp, p); +#define A(p) if (p) tmp = eina_list_append(tmp, p); A(pd->up_button) A(pd->home_button) @@ -119,7 +120,7 @@ _focus_chain_update(Eo *obj, Elm_Fileselector_Data *pd) #undef A - efl_ui_focus_manager_calc_update_order(efl_ui_focus_object_focus_manager_get(obj), obj, tmp); + efl_ui_focus_composition_elements_set(obj, tmp); } void @@ -2984,16 +2985,6 @@ _elm_fileselector_elm_interface_fileselector_sort_method_get(const Eo *obj EINA_ return sd->sort_type; } -EOLIAN static Eina_Bool -_elm_fileselector_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Fileselector_Data *pd, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect) -{ - Eina_Bool ret = efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect); - - _focus_chain_update(obj, pd); - - return ret; -} - static Eina_Bool _elm_fileselector_text_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd, const char *part, const char *label) { diff --git a/src/lib/elementary/elm_fileselector.eo b/src/lib/elementary/elm_fileselector.eo index ef59f1f183..5ebf4d0a9d 100644 --- a/src/lib/elementary/elm_fileselector.eo +++ b/src/lib/elementary/elm_fileselector.eo @@ -1,5 +1,5 @@ class Elm.Fileselector (Efl.Ui.Layout.Object, Elm.Interface.Fileselector, - Efl.Access.Widget.Action, + Efl.Access.Widget.Action, Efl.Ui.Focus.Composition, Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy) { [[Elementary fileselector class]] @@ -37,7 +37,6 @@ class Elm.Fileselector (Efl.Ui.Layout.Object, Elm.Interface.Fileselector, Efl.Object.constructor; Efl.Ui.Widget.widget_event; Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.focus_state_apply; Elm.Interface.Fileselector.selected_models { get; } Elm.Interface.Fileselector.selected_model { get; set; } Elm.Interface.Fileselector.custom_filter_append; |