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)
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,
2213 efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, 2213 efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
2214 _text_size_changed_cb, obj); 2214 _text_size_changed_cb, obj);
2215 2215
2216 elm_widget_can_focus_set(obj, EINA_TRUE); 2216 efl_ui_widget_focus_allow_set(obj, sd->editable);
2217 2217
2218 efl_ui_text_input_panel_layout_set(obj, ELM_INPUT_PANEL_LAYOUT_NORMAL); 2218 efl_ui_text_input_panel_layout_set(obj, ELM_INPUT_PANEL_LAYOUT_NORMAL);
2219 efl_ui_text_input_panel_enabled_set(obj, EINA_TRUE); 2219 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
2390 if (sd->editable == editable) return; 2390 if (sd->editable == editable) return;
2391 sd->editable = editable; 2391 sd->editable = editable;
2392 efl_ui_widget_theme_apply(obj); 2392 efl_ui_widget_theme_apply(obj);
2393 efl_ui_widget_focus_allow_set(obj, editable);
2393 2394
2394 elm_drop_target_del(obj, sd->drop_format, 2395 elm_drop_target_del(obj, sd->drop_format,
2395 _dnd_enter_cb, NULL, 2396 _dnd_enter_cb, NULL,