Commit 68d47623 authored by Andy Williams's avatar Andy Williams

elm_code: Cancel selection if clicked outside of the editor area

parent c41f5832
......@@ -1169,6 +1169,17 @@ _elm_code_widget_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
_elm_code_widget_clicked_readonly_cb(widget, row);
static void
_elm_code_widget_scroller_clicked_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
Elm_Code_Widget *widget;
widget = (Elm_Code_Widget *)data;
static void
_elm_code_widget_cursor_move_home(Elm_Code_Widget *widget)
......@@ -2274,6 +2285,8 @@ _elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd)
elm_layout_content_set(obj, "elm.swallow.content", scroller);
elm_object_focus_allow_set(scroller, EINA_FALSE);
pd->scroller = scroller;
evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_DOWN,
_elm_code_widget_scroller_clicked_cb, obj);
background = elm_bg_add(scroller);
evas_object_color_set(background, 145, 145, 145, 255);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment