From: Derek Foreman Date: Fri, 13 Apr 2018 11:41:34 +0000 (+0900) Subject: Revert "elm entry - fix wayland bug by not updating selection until after mse up" X-Git-Tag: upstream/1.21.0~1146 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b7777cdc1ab025346f19ac6cb364dd899169d48;p=platform%2Fupstream%2Fefl.git Revert "elm entry - fix wayland bug by not updating selection until after mse up" Summary: This reverts commit b0a7c4b086b8b15615a81b811eda9b215608e854. This is adding another EFL bug to work around an EFL bug. Reviewers: raster Subscribers: devilhorns, stefan_schmidt, bu5hm4n, thiepha, cedric Differential Revision: https://phab.enlightenment.org/D5933 --- diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index ea0be04..557248d 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -2833,8 +2833,6 @@ _mouse_up_cb(void *data, /******* * END * *******/ - if (sd->sel_change_timeout) ecore_timer_del(sd->sel_change_timeout); - sd->sel_change_timeout = ecore_timer_add(0.02, _entry_selection_changed_signal_job_cb, data); } /* Since context menu disabled flag was checked at mouse right key down, * hence the same should be stopped at mouse up of right key as well */ @@ -3235,37 +3233,25 @@ _entry_selection_none_signal_cb(void *data, // return win && elm_win_wl_window_get(win); //} -static Eina_Bool -_entry_selection_changed_signal_job_cb(void *data) +static void +_entry_selection_changed_signal_cb(void *data, + Evas_Object *obj EINA_UNUSED, + const char *emission EINA_UNUSED, + const char *source EINA_UNUSED) { ELM_ENTRY_DATA_GET(data, sd); - if (!sd) return EINA_FALSE; - sd->sel_change_timeout = NULL; + if (!sd) return; sd->have_selection = EINA_TRUE; efl_event_callback_legacy_call (data, EFL_UI_EVENT_SELECTION_CHANGED, NULL); // XXX: still try primary selection even if on wl in case it's // supported // if (!_entry_win_is_wl(data)) - if (!evas_pointer_button_down_mask_get(evas_object_evas_get(sd->entry_edje))) _selection_store(ELM_SEL_TYPE_PRIMARY, data); _update_selection_handler(data); if (_elm_atspi_enabled()) efl_access_event_emit(EFL_ACCESS_MIXIN, data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL); - return EINA_FALSE; -} - -static void -_entry_selection_changed_signal_cb(void *data, - Evas_Object *obj EINA_UNUSED, - const char *emission EINA_UNUSED, - const char *source EINA_UNUSED) -{ - ELM_ENTRY_DATA_GET(data, sd); - - if (sd->sel_change_timeout) ecore_timer_del(sd->sel_change_timeout); - sd->sel_change_timeout = ecore_timer_add(0.02, _entry_selection_changed_signal_job_cb, data); } static void @@ -5433,8 +5419,6 @@ _elm_entry_efl_canvas_group_group_del(Eo *obj, Elm_Entry_Data *sd) eina_stringshare_del(sd->file); - ecore_timer_del(sd->sel_change_timeout); - sd->sel_change_timeout = NULL; ecore_job_del(sd->hov_deljob); if ((sd->api) && (sd->api->obj_unhook)) sd->api->obj_unhook(obj); // module - unhook diff --git a/src/lib/elementary/elm_widget_entry.h b/src/lib/elementary/elm_widget_entry.h index 92fe00c..fedf09d 100644 --- a/src/lib/elementary/elm_widget_entry.h +++ b/src/lib/elementary/elm_widget_entry.h @@ -74,7 +74,6 @@ struct _Elm_Entry_Data Edje_Cursor sel_handler_cursor; void *input_panel_imdata; Eina_List *edje_signals; - Ecore_Timer *sel_change_timeout; int input_panel_imdata_len; int input_panel_layout_variation; int validators;