summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-16 13:58:48 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-07-16 16:37:29 +0200
commit059e82d4c1c7a49bae40b83178a9efb7e3be1175 (patch)
tree06feaf284eccd3685969583b6229784007010817
parent1bae8ec521f9e49453f51b921dbab1fe9c95fd6c (diff)
downloadefl-059e82d4c1c7a49bae40b83178a9efb7e3be1175.tar.gz
efl_ui_text: fix focus breaking
Summary: text should not be focusable by default. Only focusable if it is editable. This fixes mysterical focus disappearing in tests using efl.ui.text. Depends on D9327 Reviewers: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9328
-rw-r--r--src/lib/elementary/efl_ui_text.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 34e8a4f62b..3201c8875e 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2213,7 +2213,7 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
_text_size_changed_cb, obj);
- elm_widget_can_focus_set(obj, EINA_TRUE);
+ efl_ui_widget_focus_allow_set(obj, sd->editable);
efl_ui_text_input_panel_layout_set(obj, ELM_INPUT_PANEL_LAYOUT_NORMAL);
efl_ui_text_input_panel_enabled_set(obj, EINA_TRUE);
@@ -2390,6 +2390,7 @@ _efl_ui_text_efl_text_interactive_editable_set(Eo *obj, Efl_Ui_Text_Data *sd, Ei
if (sd->editable == editable) return;
sd->editable = editable;
efl_ui_widget_theme_apply(obj);
+ efl_ui_widget_focus_allow_set(obj, editable);
elm_drop_target_del(obj, sd->drop_format,
_dnd_enter_cb, NULL,