LIBINPUT_DEVICE_CAP_POINTER))
continue;
- if (!e_util_strcmp(libinput_device_get_name(edev->device), device_name) &&
+ if (!e_util_strcmp(edev->name, device_name) &&
!e_util_strcmp(edev->path, device_path))
{
warp_dev = edev;
{
if (seat->ptr.ix != x || seat->ptr.iy != y)
{
- _e_input_hook_call(E_INPUT_HOOK_POINTER_WARP, libinput_device_get_name(warp_dev->device));
+ _e_input_hook_call(E_INPUT_HOOK_POINTER_WARP, warp_dev->name);
seat->ptr.dx = seat->ptr.ix = x;
seat->ptr.dy = seat->ptr.iy = y;
LIBINPUT_CONFIG_STATUS_SUCCESS)
{
WRN("Failed to set left hand mode about device: %s\n",
- libinput_device_get_name(edev->device));
+ edev->name);
continue;
}
}
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))))
+ (!e_util_strcmp(device_name, edev->name)))
{
found = EINA_TRUE;
edev->disable_acceleration = !enable;
Ecore_Device *ecore_dev = NULL, *data, *detent_data = NULL;
Eina_List *l;
int x = 0, y = 0, w = 0, h = 0;
+ const char *device_name = edev->name;
if (!(input = edev->seat->input)) return;
detent_data = data;
}
}
- if (!ecore_dev && e_devicemgr_detent_is_detent(libinput_device_get_name(edev->device)))
+ if (!ecore_dev && e_devicemgr_detent_is_detent(device_name))
{
ecore_dev = detent_data;
}
{
ev->timestamp = e_util_timestamp_get();
ELOGF("Mouse", "Move (x: %d, y: %d, timestamp: %u (current time), device: %s)", NULL,
- ev->x, ev->y, ev->timestamp, ecore_device_name_get(ecore_dev));
+ ev->x, ev->y, ev->timestamp, device_name);
}
ev->multi.device = edev->mt_slot;
Ecore_Device *ecore_dev = NULL, *data, *detent_data = NULL;
Eina_List *l;
E_Comp_Config *comp_conf;
+ const char *device_name = NULL;
if (!(input = edev->seat->input)) return;
+ device_name = edev->name;
+
ecore_thread_main_loop_begin();
if (edev->ecore_dev) ecore_dev = edev->ecore_dev;
detent_data = data;
}
}
- if (!ecore_dev && e_devicemgr_detent_is_detent(libinput_device_get_name(edev->device)))
+ if (!ecore_dev && e_devicemgr_detent_is_detent(device_name))
{
ecore_dev = detent_data;
}
Ecore_Device *ecore_dev = NULL, *detent_data = NULL, *data;
Eina_List *l;
E_Comp_Config *comp_conf = NULL;
+ const char *device_name = NULL;
if (!(edev = libinput_device_get_user_data(device)))
{
state = libinput_event_pointer_get_button_state(event);
button = libinput_event_pointer_get_button(event);
timestamp = libinput_event_pointer_get_time(event);
+ device_name = edev->name;
button = ((button & 0x00F) + 1);
if (button == 3) button = 2;
{
ELOGF("Mouse", "Button Press (btn: %d, device: %s) is blocked by %p, server: 0x%x", NULL,
- button, ecore_device_name_get(ecore_dev), blocked_client,
+ button, device_name, blocked_client,
edev->seat->dev->server_blocked);
goto end;
}
Eina_List *l;
E_Comp_Config *comp_conf = NULL;
int direction = 0, z = 0;
+ const char *device_name = NULL;
if (!(edev = libinput_device_get_user_data(device)))
{
return;
}
+ device_name = edev->name;
+
ecore_thread_main_loop_begin();
if (edev->ecore_dev) ecore_dev = edev->ecore_dev;
edev->seat = seat;
edev->device = device;
edev->path = eina_stringshare_printf("%s/%s", e_input_base_dir_get(), libinput_device_get_sysname(device));
+ edev->name = eina_stringshare_add(libinput_device_get_name(device) ?: "No Name");
if (e_input)
g_rec_mutex_lock(&e_input->libinput_mutex);
LIBINPUT_CONFIG_STATUS_SUCCESS)
{
WRN("Failed to set left hand mode about device: %s\n",
- libinput_device_get_name(device));
+ edev->name);
}
}
}
glist = g_list_next(glist);
}
}
+ if (edev->name) eina_stringshare_del(edev->name);
if (edev->path) eina_stringshare_del(edev->path);
if (e_input) g_rec_mutex_lock(&e_input->libinput_mutex);
if (edev->device) libinput_device_unref(edev->device);
EINA_SAFETY_ON_NULL_RETURN_VAL(evdev, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(evdev->device, NULL);
- return libinput_device_get_name(evdev->device);
+ return evdev->name;
}
EINTERN const char *
LIBINPUT_CONFIG_STATUS_SUCCESS)
{
WRN("Failed to set input transformation about device: %s\n",
- libinput_device_get_name(edev->device));
+ edev->name);
return EINA_FALSE;
}
LIBINPUT_CONFIG_STATUS_SUCCESS)
{
WRN("Failed to set mouse accel about device: %s\n",
- libinput_device_get_name(edev->device));
+ edev->name);
return EINA_FALSE;
}
return EINA_FALSE;
}
- ecore_device_name_set(dev, libinput_device_get_name(edev->device));
+ ecore_device_name_set(dev, edev->name);
ecore_device_identifier_set(dev, edev->path);
ecore_device_class_set(dev, clas);
ecore_device_subclass_set(dev, subclas);
}
}
- e_device_name_set(e_dev, libinput_device_get_name(edev->device));
+ e_device_name_set(e_dev, edev->name);
e_device_identifier_set(e_dev, edev->path);
e_device_class_set(e_dev, clas);
e_device_subclass_set(e_dev, subclas);
if (edev->caps & E_INPUT_SEAT_POINTER)
{
- if (!e_devicemgr_detent_is_detent(libinput_device_get_name(edev->device)))
+ if (!e_devicemgr_detent_is_detent(edev->name))
{
clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_POINTER);
subclas = _e_input_device_get_ecore_device_subclass(edev, clas);
if (edev->caps & E_INPUT_SEAT_POINTER)
{
- if (!e_devicemgr_detent_is_detent(libinput_device_get_name(edev->device)))
+ if (!e_devicemgr_detent_is_detent(edev->name))
clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_POINTER);
_e_input_remove_ecore_device(edev, clas);
}