Page MenuHomePhabricator

efl_input_clickable: increase the time interval for repeated counter

Authored by Jaehyun_Cho on Aug 1 2019, 9:50 PM.



The repeated counter in Efl.Input.Clickable_Clicked can be used to
identify double click or triple click.

Previously, the repeated counter in Efl.Input.Clickable_Clicked was
calculated within the time interval 0.1 second.

Now, the time interval for the repeated counter is increased to 0.25
second. It seems that 0.25 second is more appropriate to identify if the
two consecutive clicks should be considered together.
(e.g. considered as double click or triple click)
Moreover, in ecore_event and edje, 0.25 second is already used as a time
interval for double click.

Test Plan
  1. Run Efl.Ui.Button in elementary_test
  2. Do double click or triple click the buttons

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
Jaehyun_Cho created this revision.Aug 1 2019, 9:50 PM
Jaehyun_Cho requested review of this revision.Aug 1 2019, 9:50 PM
YOhoho added a subscriber: YOhoho.Aug 1 2019, 10:22 PM

In ecore_event and edje, DoubleClick time is 0.25s.

ecore_wlecore_wayland/ecore_wl_input.c:54:static double _ecore_wl_double_click_time = 0.25;
ecore_wl2ecore_wl2/ecore_wl2_input.c:320: if (((int)(timestamp - info->last_time) <= (int)(1000 * 0.25)) &&
ecore_win32ecore_win32/ecore_win32.c:397:double _ecore_win32_double_click_time = 0.25;
ecore_fb_tsecore_fb/ecore_fb_ts.c:78:static double _ecore_fb_double_click_time = 0.25;
ecore_xecore_x/ecore_x.c:78:double _ecore_x_double_click_time = 0.25;
ecroe_drmecore_drm/ecore_drm_evdev.c:694: edev->mouse.threshold = 250;
edjeedje use EVAS_BUTTON_DOUBLE_CLICK flag that is set by ecore_event

What do you think to make clickable double click time 0.25s for consistency?

@YOhoho Thank you very much for your comment! :) I did not know that. I also updated the commit message as well. When I modified time interval from 0.5 to 0.25, I think that repeated counter is calculated fine for double click and triple click.

Jaehyun_Cho edited the summary of this revision. (Show Details)Aug 1 2019, 10:48 PM
Jaehyun_Cho added a reviewer: YOhoho.
YOhoho accepted this revision.Aug 1 2019, 11:08 PM

Thank you!
Looks find to me.

This revision is now accepted and ready to land.Aug 1 2019, 11:08 PM
segfaultxavi accepted this revision.Aug 2 2019, 12:17 AM

Makes sense. Is there any information in the commit that introduced de 0.1s for the first time about why they choose such a low value?

No, there is no information about the initial time interval.
So I think there is no problem of applying 0.25 second here :)

This revision was automatically updated to reflect the committed changes.