aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichaƫl Bouchaud (yoz) <yoz@efl.so>2019-01-31 09:10:57 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-01-31 09:10:57 -0500
commit3ab092a61c181dfd9b34bdb53dee9a7e911604d0 (patch)
tree975a27a5ae30194550c0eb80219eb22e9275361b
parente focus - fix to previous commit to restore keybinds on last win del (diff)
downloadenlightenment-3ab092a61c181dfd9b34bdb53dee9a7e911604d0.tar.gz
conf_interaction: Support tap-to-click with pointer device
Summary: Allow to setup tap-to-click feature with libinput pointer device. @feature Reviewers: devilhorns, zmike Reviewed By: devilhorns Subscribers: cedric, zmike Tags: #enlightenment-git Differential Revision: https://phab.enlightenment.org/D7845
-rw-r--r--src/bin/e_config.c2
-rw-r--r--src/bin/e_config.h1
-rw-r--r--src/bin/e_mouse.c1
-rw-r--r--src/modules/conf_interaction/e_int_config_mouse.c7
-rw-r--r--src/modules/wl_drm/e_mod_main.c1
5 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index f0de5cf52..7c2579489 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -651,6 +651,7 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, mouse_accel_numerator, INT);
E_CONFIG_VAL(D, T, mouse_accel_denominator, INT);
E_CONFIG_VAL(D, T, mouse_accel_threshold, INT);
+ E_CONFIG_VAL(D, T, touch_tap_to_click, UCHAR);
E_CONFIG_VAL(D, T, border_raise_on_mouse_action, INT);
E_CONFIG_VAL(D, T, border_raise_on_focus, INT);
@@ -1732,6 +1733,7 @@ e_config_load(void)
E_CONFIG_LIMIT(e_config->mouse_accel_numerator, 1, 30);
E_CONFIG_LIMIT(e_config->mouse_accel_denominator, 1, 10);
E_CONFIG_LIMIT(e_config->mouse_accel_threshold, 0, 10);
+ E_CONFIG_LIMIT(e_config->touch_tap_to_click, 0, 3);
E_CONFIG_LIMIT(e_config->menu_favorites_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_apps_show, 0, 1);
diff --git a/src/bin/e_config.h b/src/bin/e_config.h
index 19a3deaa2..500a20f08 100644
--- a/src/bin/e_config.h
+++ b/src/bin/e_config.h
@@ -255,6 +255,7 @@ struct _E_Config
int mouse_accel_numerator; // GUI
int mouse_accel_denominator; // GUI
int mouse_accel_threshold; // GUI
+ unsigned char touch_tap_to_click; // GUI
int border_raise_on_mouse_action; // GUI
int border_raise_on_focus; // GUI
diff --git a/src/bin/e_mouse.c b/src/bin/e_mouse.c
index 67761cafb..cc217e1a7 100644
--- a/src/bin/e_mouse.c
+++ b/src/bin/e_mouse.c
@@ -55,6 +55,7 @@ e_mouse_update(void)
{
ecore_drm2_device_pointer_left_handed_set(dev, (Eina_Bool)!e_config->mouse_hand);
ecore_drm2_device_pointer_accel_speed_set(dev, e_config->mouse_accel_numerator);
+ ecore_drm2_device_touch_tap_to_click_enabled_set(dev, e_config->touch_tap_to_click);
}
}
#endif
diff --git a/src/modules/conf_interaction/e_int_config_mouse.c b/src/modules/conf_interaction/e_int_config_mouse.c
index 5c38551fb..ef28771b3 100644
--- a/src/modules/conf_interaction/e_int_config_mouse.c
+++ b/src/modules/conf_interaction/e_int_config_mouse.c
@@ -24,6 +24,7 @@ struct _E_Config_Dialog_Data
double numerator;
double denominator;
double threshold;
+ int tap_to_click;
};
E_Config_Dialog *
@@ -61,6 +62,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->numerator = e_config->mouse_accel_numerator;
cfdata->denominator = e_config->mouse_accel_denominator;
cfdata->threshold = e_config->mouse_accel_threshold;
+ cfdata->tap_to_click = e_config->touch_tap_to_click;
}
static void *
@@ -83,6 +85,7 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
(cfdata->use_e_cursor == e_config->use_e_cursor) &&
(cfdata->cursor_size == e_config->cursor_size) &&
(cfdata->mouse_hand == e_config->mouse_hand) &&
+ (cfdata->tap_to_click == e_config->touch_tap_to_click) &&
EINA_DBL_EQ(cfdata->numerator, e_config->mouse_accel_numerator) &&
EINA_DBL_EQ(cfdata->denominator, e_config->mouse_accel_denominator) &&
EINA_DBL_EQ(cfdata->threshold, e_config->mouse_accel_threshold));
@@ -108,6 +111,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
e_config->mouse_accel_numerator = cfdata->numerator;
e_config->mouse_accel_denominator = cfdata->denominator;
e_config->mouse_accel_threshold = cfdata->threshold;
+ e_config->touch_tap_to_click = cfdata->tap_to_click;
e_config_save_queue();
/* Apply the above settings */
@@ -230,6 +234,9 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
&(cfdata->threshold), NULL, 100);
e_widget_framelist_object_append(of, ob);
+ oc = e_widget_check_add(evas, _("Tap to click"), &(cfdata->tap_to_click));
+ e_widget_framelist_object_append(of, oc);
+
e_widget_list_object_append(ol, of, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Mouse"), ol,
1, 0, 1, 0, 0.5, 0.0);
diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c
index d51293c1d..3cdb746c0 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -713,6 +713,7 @@ _drm2_cb_seat_caps(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
}
else if (ev->pointer_count > 0)
{
+ e_mouse_update();
e_comp_wl_input_pointer_enabled_set(EINA_TRUE);
e_pointer_show(e_comp->pointer);
}