+
+E_API Eina_Bool
+e_input_device_mouse_accel_enable_set(const char *device_name, Eina_Bool enable)
+{
+ const Eina_List *l, *ll, *lll;
+ E_Input_Device *dev;
+ E_Input_Seat *seat;
+ E_Input_Evdev *edev;
+ Eina_Bool found = EINA_FALSE;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(device_name, EINA_FALSE);
+
+ EINA_LIST_FOREACH(e_input_devices_get(), l, dev)
+ {
+ EINA_LIST_FOREACH(dev->seats, ll, seat)
+ {
+ EINA_LIST_FOREACH(seat->devices, lll, edev)
+ {
+ if ((edev->caps & E_INPUT_SEAT_POINTER) &&
+ (!e_util_strcmp(device_name, libinput_device_get_name(edev->device))))
+ {
+ found = EINA_TRUE;
+ edev->disable_acceleration = !enable;
+ }
+ }
+ }
+ }
+
+ if (!found)
+ {
+ ERR("Failed to find input device. device(%s)", device_name);
+ return EINA_FALSE;
+ }
+
+ INF("device(%s) mouse_accel is %s", device_name, enable ? "ON" : "OFF");
+
+ return EINA_TRUE;
+}