focus: block focus manager from getting key inputs when they are consumed

This commit is contained in:
Boris Faure 2019-06-18 22:06:44 +02:00
parent c151c3c0a0
commit cf060d2a04
3 changed files with 6 additions and 3 deletions

View File

@ -4011,7 +4011,7 @@ termio_add(Evas_Object *win, Config *config,
void
termio_key_down(Evas_Object *termio,
const Evas_Event_Key_Down *ev,
Evas_Event_Key_Down *ev,
Eina_Bool action_handled)
{
Termio *sd = evas_object_smart_data_get(termio);
@ -4027,4 +4027,5 @@ termio_key_down(Evas_Object *termio,
}
if (sd->config->flicker_on_key)
edje_object_signal_emit(sd->cursor.obj, "key,down", "terminology");
ev->event_flags = EVAS_EVENT_FLAG_ON_HOLD;
}

View File

@ -63,7 +63,8 @@ Termpty *termio_pty_get(const Evas_Object *obj);
Evas_Object * termio_miniview_get(const Evas_Object *obj);
Term* termio_term_get(const Evas_Object *obj);
void termio_key_down(Evas_Object *termio, const Evas_Event_Key_Down *ev,
void termio_key_down(Evas_Object *termio,
Evas_Event_Key_Down *ev,
Eina_Bool action_handled);
void termio_focus_in(Evas_Object *termio);
void termio_focus_out(Evas_Object *termio);

View File

@ -1663,6 +1663,8 @@ win_new(const char *name, const char *role, const char *title,
evas_object_show(o);
wn->base = o = elm_layout_add(wn->win);
elm_object_focus_allow_set(o, EINA_TRUE);
evas_object_propagate_events_set(o, EINA_FALSE);
theme_apply_elm(o, config, "terminology/base");
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -5583,7 +5585,6 @@ term_new(Win *wn, Config *config, const char *cmd,
term->config = config;
term->base = o = elm_layout_add(wn->win);
elm_object_focus_allow_set(o, EINA_TRUE);
theme_apply_elm(o, term->config, "terminology/core");
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);