ajwillia-ms pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=9db0d1f949ae7757f1c086e1d8ec2593afd2c78e
commit 9db0d1f949ae7757f1c086e1d8ec2593afd2c78e Author: Al Poole <nets...@gmail.com> Date: Thu Nov 9 00:38:51 2017 +0000 elm_code_widget: keep track of visibility. Keep track of visibility and ensure the cursor can never be filled when hidden. This should finally end any issue with the cursor and visibility with the new focus system. Didn't see this previously until working on Edi's bottom panes which caused redraw on resize of the widgets. @fix --- src/lib/elementary/elm_code_widget.c | 4 +++- src/lib/elementary/elm_code_widget_private.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 954b2f99a7..8880c2fc69 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -271,7 +271,7 @@ _elm_code_widget_fill_cursor(Elm_Code_Widget *widget, unsigned int number, int g pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS); - if (pd->editable && pd->focussed && pd->cursor_line == number) + if (pd->visible && pd->editable && pd->focussed && pd->cursor_line == number) { if (pd->cursor_col + gutter - 1 >= (unsigned int) w) return; @@ -617,6 +617,7 @@ _elm_code_widget_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_ pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS); + pd->visible = EINA_TRUE; if (pd->cursor_rect) evas_object_show(pd->cursor_rect); } @@ -630,6 +631,7 @@ _elm_code_widget_hidden_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS); + pd->visible = EINA_FALSE; if (pd->cursor_rect) evas_object_hide(pd->cursor_rect); } diff --git a/src/lib/elementary/elm_code_widget_private.h b/src/lib/elementary/elm_code_widget_private.h index ebedec3ad7..bef2b088b3 100644 --- a/src/lib/elementary/elm_code_widget_private.h +++ b/src/lib/elementary/elm_code_widget_private.h @@ -24,7 +24,7 @@ typedef struct unsigned int cursor_line, cursor_col; Evas_Object *cursor_rect; - Eina_Bool editable, focussed; + Eina_Bool visible, editable, focussed; Eina_Bool show_line_numbers; unsigned int line_width_marker, tabstop; Eina_Bool show_whitespace, tab_inserts_spaces; --