edev->mouse.maxw = w;
edev->mouse.maxh = h;
- if (libinput_device_has_capability(edev->device, LIBINPUT_DEVICE_CAP_POINTER))
+ if (edev->caps & E_INPUT_SEAT_POINTER)
{
edev->seat->ptr.dx = (double)(w / 2);
edev->seat->ptr.dy = (double)(h / 2);
edev->mouse.miny = output->config.geom.y;
edev->mouse.maxw = output->config.geom.w;
edev->mouse.maxh = output->config.geom.h;
- if (libinput_device_has_capability(edev->device, LIBINPUT_DEVICE_CAP_POINTER))
+ if (edev->caps & E_INPUT_SEAT_POINTER)
{
edev->seat->ptr.dx = (double)(edev->mouse.maxw / 2);
edev->seat->ptr.dy = (double)(edev->mouse.maxh / 2);
EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
- E_Input *e_input = e_input_get();
-
/* try to allocate space for new evdev */
if (!(edev = calloc(1, sizeof(E_Input_Evdev)))) return NULL;
edev->device = device;
edev->path = eina_stringshare_printf("%s/%s", e_input_base_dir_get(), libinput_device_get_sysname(device));
- if (e_input)
- g_rec_mutex_lock(&e_input->libinput_mutex);
-
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD))
{
edev->caps |= E_INPUT_SEAT_KEYBOARD;
/* configure device */
_device_configure(edev);
- if (e_input)
- g_rec_mutex_unlock(&e_input->libinput_mutex);
-
return edev;
}
_e_input_evdev_device_destroy(E_Input_Evdev *edev)
{
Ecore_Device *dev;
- E_Input *e_input = e_input_get();
-
EINA_SAFETY_ON_NULL_RETURN(edev);
ecore_thread_main_loop_begin();
}
}
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);
- if (e_input) g_rec_mutex_unlock(&e_input->libinput_mutex);
if (edev->key_remap_hash) eina_hash_free(edev->key_remap_hash);
if (edev->touch.coords)
{
{
Eina_Bool res = EINA_FALSE;
E_Input_Backend *input;
- E_Input *e_input = e_input_get();
EINA_SAFETY_ON_NULL_RETURN_VAL(seatname, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(evdev, EINA_FALSE);
input = evdev->seat->input;
if (!input) return EINA_FALSE;
- if (e_input)
- g_rec_mutex_lock(&e_input->libinput_mutex);
-
if (libinput_dispatch(input->libinput) != 0)
{
ERR("Failed to dispatch libinput events: %m");
- if (e_input)
- g_rec_mutex_unlock(&e_input->libinput_mutex);
-
return EINA_FALSE;
}
- if (e_input)
- g_rec_mutex_unlock(&e_input->libinput_mutex);
-
/* process pending events */
_input_events_process(input);
res = EINA_TRUE;
_input_events_process(E_Input_Backend *input)
{
struct libinput_event *event;
- E_Input *e_input = e_input_get();
-
- if (e_input)
- g_rec_mutex_lock(&e_input->libinput_mutex);
-
while ((event = libinput_get_event(input->libinput)))
{
_input_event_process(event);
libinput_event_destroy(event);
}
-
- if (e_input)
- g_rec_mutex_unlock(&e_input->libinput_mutex);
}
static Eina_Bool
ELOGF("INPUT", "input_dispatch|B|", NULL);
}
- E_Input *e_input = e_input_get();
-
GIOCondition cond;
cond = g_source_query_unix_fd(source, src->tag);
if (!input->libinput)
return G_SOURCE_REMOVE;
- if (e_input)
- g_rec_mutex_lock(&e_input->libinput_mutex);
-
if (e_config->key_input_ttrace_enable)
{
TRACE_INPUT_BEGIN(libinput_dispatch);
ELOGF("INPUT", "libinput_dispatch|E|", NULL);
}
- if (e_input)
- g_rec_mutex_unlock(&e_input->libinput_mutex);
-
if (e_config->key_input_ttrace_enable)
{
TRACE_INPUT_BEGIN(_input_events_process);