forked from enlightenment/enlightenment
conf_interaction: Support mouse acceleration under Wayland
Wayland mouse acceleration uses different values (via libinput) than X11 does. As such, we need to check the compositor type when creating the Mouse Input config dialog and adjust values accordingly. ref T7534 @fix
This commit is contained in:
parent
9568b29e64
commit
a0e394b1a5
|
@ -52,7 +52,10 @@ e_mouse_update(void)
|
|||
|
||||
dev = ecore_evas_data_get(e_comp->ee, "device");
|
||||
if (dev)
|
||||
ecore_drm2_device_pointer_left_handed_set(dev, (Eina_Bool)!e_config->mouse_hand);
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
|
|
|
@ -207,8 +207,21 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
|
|||
|
||||
ob = e_widget_label_add(evas, _("Acceleration"));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f"), 1.0, 30.0, 1.0, 0,
|
||||
&(cfdata->numerator), NULL, 100);
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f"), 1.0, 30.0, 1.0, 0,
|
||||
&(cfdata->numerator), NULL, 100);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
|
||||
{
|
||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f"), -1.0, 1.0, 0.2, 0,
|
||||
&(cfdata->numerator), NULL, 100);
|
||||
}
|
||||
#endif
|
||||
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
ob = e_widget_label_add(evas, _("Threshold"));
|
||||
|
|
Loading…
Reference in New Issue