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 = NULL;
+ uint32_t timestamp = 0;
if (!(input = edev->seat->input)) return;
+ device_name = libinput_device_get_name(edev->device);
+ timestamp = libinput_event_pointer_get_time(event);
+
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;
}
if (event)
{
- ev->timestamp = libinput_event_pointer_get_time(event);
+ ev->timestamp = timestamp;
}
else
{
Ecore_Device *ecore_dev = NULL, *data, *detent_data = NULL;
Eina_List *l;
E_Comp_Config *comp_conf;
+ const char *device_name = NULL;
+ uint32_t timestamp = 0;
if (!(input = edev->seat->input)) return;
+ device_name = libinput_device_get_name(edev->device);
+ timestamp = libinput_event_pointer_get_time(event);
+
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;
}
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
- if (event) ev->timestamp = libinput_event_pointer_get_time(event);
+ if (event) ev->timestamp = timestamp;
ev->modifiers = edev->xkb.modifiers;
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)))
{
return;
}
+ state = libinput_event_pointer_get_button_state(event);
+ button = libinput_event_pointer_get_button(event);
+ timestamp = libinput_event_pointer_get_time(event);
+ device_name = libinput_device_get_name(edev->device);
+
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;
}
goto end;
}
- state = libinput_event_pointer_get_button_state(event);
- button = libinput_event_pointer_get_button(event);
- timestamp = libinput_event_pointer_get_time(event);
-
button = ((button & 0x00F) + 1);
if (button == 3) button = 2;
else if (button == 2) button = 3;
if ((edev->seat->dev->blocked & E_INPUT_SEAT_POINTER) ||
(edev->seat->dev->server_blocked & E_INPUT_SEAT_POINTER))
{
-
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,
edev->seat->dev->server_blocked);
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 = libinput_device_get_name(edev->device);
+ timestamp = libinput_event_pointer_get_time(event);
+
+ axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
+ if (libinput_event_pointer_has_axis(event, axis))
+ z = _axis_value_get(event, axis);
+
+ axis = LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL;
+ if (libinput_event_pointer_has_axis(event, axis))
+ {
+ direction = 1;
+ z = _axis_value_get(event, axis);
+ }
+
+ if (z == 0)
+ {
+ ELOGF("Mouse", "Axis event is ignored since it has zero value", NULL);
+ return;
+ }
+
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;
}
goto end;
}
- axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
- if (libinput_event_pointer_has_axis(event, axis))
- z = _axis_value_get(event, axis);
-
- axis = LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL;
- if (libinput_event_pointer_has_axis(event, axis))
- {
- direction = 1;
- z = _axis_value_get(event, axis);
- }
-
- if (z == 0)
- {
- ELOGF("Mouse", "Axis event is ignored since it has zero value", NULL);
- goto end;
- }
-
comp_conf = e_comp_config_get();
if (comp_conf && comp_conf->e_wheel_click_angle)
{
goto end;
}
- timestamp = libinput_event_pointer_get_time(event);
-
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ev->root_window = (Ecore_Window)input->dev->window;
ELOGF("Mouse", "Wheel (direction: %d, value: %d)", NULL, ev->direction, ev->z);
}
-
ev->dev = ecore_device_ref(ecore_dev);
ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, _e_input_event_mouse_wheel_cb_free, NULL);
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 = libinput_device_get_name(edev->device);
+ timestamp = libinput_event_pointer_get_time(event);
+
+ axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
+ if (libinput_event_pointer_has_axis(event, axis))
+ z = _scroll_value_get(event, axis, source);
+
+ axis = LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL;
+ if (libinput_event_pointer_has_axis(event, axis))
+ {
+ direction = 1;
+ z = _scroll_value_get(event, axis, source);
+ }
+
+ if (z == 0)
+ {
+ ELOGF("Mouse", "Scroll event is ignored since it has zero value", NULL);
+ return;
+ }
+
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;
}
goto end;
}
- axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
- if (libinput_event_pointer_has_axis(event, axis))
- z = _scroll_value_get(event, axis, source);
-
- axis = LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL;
- if (libinput_event_pointer_has_axis(event, axis))
- {
- direction = 1;
- z = _scroll_value_get(event, axis, source);
- }
-
- if (z == 0)
- {
- ELOGF("Mouse", "Scroll event is ignored since it has zero value", NULL);
- goto end;
- }
-
comp_conf = e_comp_config_get();
if (comp_conf && comp_conf->e_wheel_click_angle)
{
goto end;
}
- timestamp = libinput_event_pointer_get_time(event);
-
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ev->root_window = (Ecore_Window)input->dev->window;
uint32_t timestamp, button = 0;
Ecore_Device *ecore_dev = NULL, *data;
Eina_List *l;
+ double radius_x = 1;
+ double radius_y = 1;
+ double pressure = 1.0;
+ double angle = 0.0;
if (!edev) return;
if (!(input = edev->seat->input)) return;
+ timestamp = libinput_event_touch_get_time(event);
+#if LIBINPUT_SUPPORT_EXTRA_TOUCH_EVENT
+ if (libinput_event_get_type(libinput_event_touch_get_base_event(event))
+ == LIBINPUT_EVENT_TOUCH_DOWN)
+ {
+ if (libinput_event_touch_has_minor(event))
+ radius_x = libinput_event_touch_get_minor(event);
+ if (libinput_event_touch_has_major(event))
+ radius_y = libinput_event_touch_get_major(event);
+ if (libinput_event_touch_has_pressure(event))
+ pressure = libinput_event_touch_get_pressure(event);
+ if (libinput_event_touch_has_orientation(event))
+ angle = libinput_event_touch_get_orientation(event);
+ }
+#endif
+
ecore_thread_main_loop_begin();
if (edev->ecore_dev) ecore_dev = edev->ecore_dev;
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) goto end;
- timestamp = libinput_event_touch_get_time(event);
-
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ev->root_window = (Ecore_Window)input->dev->window;
ev->multi.device = edev->mt_slot;
ev->multi.radius = 1;
- ev->multi.radius_x = 1;
- ev->multi.radius_y = 1;
- ev->multi.pressure = 1.0;
- ev->multi.angle = 0.0;
-#if LIBINPUT_SUPPORT_EXTRA_TOUCH_EVENT
- if (libinput_event_get_type(libinput_event_touch_get_base_event(event))
- == LIBINPUT_EVENT_TOUCH_DOWN)
- {
- if (libinput_event_touch_has_minor(event))
- ev->multi.radius_x = libinput_event_touch_get_minor(event);
- if (libinput_event_touch_has_major(event))
- ev->multi.radius_y = libinput_event_touch_get_major(event);
- if (libinput_event_touch_has_pressure(event))
- ev->multi.pressure = libinput_event_touch_get_pressure(event);
- if (libinput_event_touch_has_orientation(event))
- ev->multi.angle = libinput_event_touch_get_orientation(event);
- }
-#endif
+ ev->multi.radius_x = radius_x;
+ ev->multi.radius_y = radius_y;
+ ev->multi.pressure = pressure;
+ ev->multi.angle = angle;
+
ev->multi.x = ev->x;
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
Ecore_Event_Mouse_Move *ev;
Ecore_Device *ecore_dev = NULL, *data;
Eina_List *l;
+ uint32_t timestamp = 0;
+ double radius_x = 1.0, radius_y = 1.0, pressure = 1.0, angle = 0.0;
if (!edev) return;
if (!(input = edev->seat->input)) return;
+ timestamp = libinput_event_touch_get_time(event);
+#if LIBINPUT_SUPPORT_EXTRA_TOUCH_EVENT
+ if (libinput_event_touch_has_minor(event))
+ radius_x = libinput_event_touch_get_minor(event);
+ if (libinput_event_touch_has_major(event))
+ radius_y = libinput_event_touch_get_major(event);
+ if (libinput_event_touch_has_pressure(event))
+ pressure = libinput_event_touch_get_pressure(event);
+ if (libinput_event_touch_has_orientation(event))
+ angle = libinput_event_touch_get_orientation(event);
+#endif
+
ecore_thread_main_loop_begin();
if (edev->ecore_dev) ecore_dev = edev->ecore_dev;
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ev->root_window = (Ecore_Window)input->dev->window;
- ev->timestamp = libinput_event_touch_get_time(event);
+ ev->timestamp = timestamp;
ev->same_screen = 1;
_device_modifiers_update(edev);
ev->multi.device = edev->mt_slot;
ev->multi.radius = 1;
- ev->multi.radius_x = 1;
- ev->multi.radius_y = 1;
- ev->multi.pressure = 1.0;
- ev->multi.angle = 0.0;
-#if LIBINPUT_SUPPORT_EXTRA_TOUCH_EVENT
- if (libinput_event_touch_has_minor(event))
- ev->multi.radius_x = libinput_event_touch_get_minor(event);
- if (libinput_event_touch_has_major(event))
- ev->multi.radius_y = libinput_event_touch_get_major(event);
- if (libinput_event_touch_has_pressure(event))
- ev->multi.pressure = libinput_event_touch_get_pressure(event);
- if (libinput_event_touch_has_orientation(event))
- ev->multi.angle = libinput_event_touch_get_orientation(event);
-#endif
+ ev->multi.radius_x = radius_x;
+ ev->multi.radius_y = radius_y;
+ ev->multi.pressure = pressure;
+ ev->multi.angle = angle;
ev->multi.x = ev->x;
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
if (!edev) return;
if (!(input = edev->seat->input)) return;
+ timestamp = libinput_event_touch_get_time(event);
+
ecore_thread_main_loop_begin();
if (edev->ecore_dev) ecore_dev = edev->ecore_dev;
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) goto end;
- timestamp = libinput_event_touch_get_time(event);
-
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ev->root_window = (Ecore_Window)input->dev->window;
Ecore_Device *ecore_dev = NULL, *data;
Eina_List *l;
E_Comp_Config *comp_conf;
-
- ecore_thread_main_loop_begin();
+ uint32_t timestamp = 0;
+ int touch_value;
if (libinput_event_touch_aux_data_get_type(event) != LIBINPUT_TOUCH_AUX_DATA_TYPE_PALM &&
libinput_event_touch_aux_data_get_value(event) > 0)
- goto end;
+ return;
- if (!(edev = libinput_device_get_user_data(device))) goto end;
- if (!(input = edev->seat->input)) goto end;
+ if (!(edev = libinput_device_get_user_data(device))) return;
+ if (!(input = edev->seat->input)) return;
+
+ timestamp = libinput_event_touch_aux_data_get_time(event);
+ touch_value = libinput_event_touch_aux_data_get_value(event);
+
+ ecore_thread_main_loop_begin();
if (edev->ecore_dev) ecore_dev = edev->ecore_dev;
else if (edev->ecore_dev_list && eina_list_count(edev->ecore_dev_list) > 0)
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ev->root_window = (Ecore_Window)input->dev->window;
- ev->timestamp = libinput_event_touch_aux_data_get_time(event);
+ ev->timestamp = timestamp;;
axis = (Ecore_Axis *)calloc(1, sizeof(Ecore_Axis));
if (axis)
{
axis->label = ECORE_AXIS_LABEL_TOUCH_PALM;
- axis->value = libinput_event_touch_aux_data_get_value(event);
+ axis->value = touch_value;
ev->naxis = 1;
}
ev->axis = axis;