if (!(input = edev->seat->input)) return;
+ 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)
{
if (!ecore_dev)
{
ERR("Failed to get source ecore device from event !\n");
- return;
+ goto end;
}
else if ((detent_data == ecore_dev) || e_devicemgr_detent_is_detent(ecore_device_name_get(ecore_dev)))
{
/* Do not process detent device's move events. */
- return;
+ goto end;
}
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
ev->multi.root.x = ev->x;
ev->multi.root.y = ev->y;
- ecore_thread_main_loop_begin();
-
ev->dev = ecore_device_ref(ecore_dev);
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, _e_input_event_mouse_move_cb_free, NULL);
+end:
ecore_thread_main_loop_end();
}
return;
}
+ 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)
{
if (!ecore_dev)
{
ERR("Failed to get source ecore device from event !\n");
- return;
+ goto end;
}
state = libinput_event_pointer_get_button_state(event);
ELOGF("Mouse", "Button Press (btn: %d, device: %s) is blocked by %p, server: 0x%x", NULL,
button, ecore_device_name_get(ecore_dev), edev->seat->dev->blocked_client,
edev->seat->dev->server_blocked);
- return;
+ goto end;
}
else
{
ELOGF("Mouse", "Button Release (btn: %d, device: %s) is blocked by %p, server: 0x%x", NULL,
button, ecore_device_name_get(ecore_dev), edev->seat->dev->blocked_client,
edev->seat->dev->server_blocked);
- return;
+ goto end;
}
edev->mouse.pressed_button &= ~(1 << button);
}
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button))))
{
- return;
+ goto end;
}
ev->window = (Ecore_Window)input->dev->window;
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
ev->multi.root.y = ev->y;
-
- ecore_thread_main_loop_begin();
-
ev->dev = ecore_device_ref(ecore_dev);
if (state)
else
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, _e_input_event_mouse_button_cb_free, NULL);
+end:
ecore_thread_main_loop_end();
}
return;
}
+ 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)
{
if (!ecore_dev)
{
ERR("Failed to get source ecore device from event !\n");
- return;
+ goto end;
}
axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
if (z == 0)
{
ELOGF("Mouse", "Axis event is ignored since it has zero value", NULL);
- return;
+ goto end;
}
comp_conf = e_comp_config_get();
else
ELOGF("Mouse", "Wheel (direction: %d, value: %d) is blocked by %p, server: 0x%x", NULL,
direction, z, edev->seat->dev->blocked_client, edev->seat->dev->server_blocked);
- return;
+ goto end;
}
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Wheel))))
{
- return;
+ goto end;
}
timestamp = libinput_event_pointer_get_time(event);
ELOGF("Mouse", "Wheel (direction: %d, value: %d)", NULL, ev->direction, ev->z);
}
- ecore_thread_main_loop_begin();
+
ev->dev = ecore_device_ref(ecore_dev);
ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, _e_input_event_mouse_wheel_cb_free, NULL);
+
+end:
ecore_thread_main_loop_end();
}
#endif
return;
}
+ 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)
{
if (!ecore_dev)
{
ERR("Failed to get source ecore device from event !\n");
- return;
+ goto end;
}
axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
if (z == 0)
{
ELOGF("Mouse", "Scroll event is ignored since it has zero value", NULL);
- return;
+ goto end;
}
comp_conf = e_comp_config_get();
else
ELOGF("Mouse", "Wheel (direction: %d, value: %d) is blocked by %p, server: 0x%x", NULL,
direction, z, edev->seat->dev->blocked_client, edev->seat->dev->server_blocked);
- return;
+ goto end;
}
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Wheel))))
{
- return;
+ goto end;
}
timestamp = libinput_event_pointer_get_time(event);
ELOGF("Mouse", "Wheel (direction: %d, value: %d)", NULL, ev->direction, ev->z);
}
- ecore_thread_main_loop_begin();
ev->dev = ecore_device_ref(ecore_dev);
ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, _e_input_event_mouse_wheel_cb_free, NULL);
+
+end:
ecore_thread_main_loop_end();
}
#endif
if (!edev) return;
if (!(input = edev->seat->input)) return;
+ 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)
{
if (!ecore_dev)
{
ERR("Failed to get source ecore device from event !\n");
- return;
+ goto end;
}
- if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
+ if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) goto end;
timestamp = libinput_event_touch_get_time(event);
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
ev->multi.root.y = ev->y;
-
- ecore_thread_main_loop_begin();
-
ev->dev = ecore_device_ref(ecore_dev);
if (state == ECORE_EVENT_MOUSE_BUTTON_DOWN)
ecore_event_add(state, ev, _e_input_event_mouse_button_cb_free, NULL);
+end:
ecore_thread_main_loop_end();
}
if (!ecore_dev)
{
ERR("Failed to get source ecore device from event !\n");
- return;
+ goto end;
}
- if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
+ if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) goto end;
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, _e_input_event_mouse_move_cb_free, NULL);
+end:
ecore_thread_main_loop_end();
}
if (!edev) return;
if (!(input = edev->seat->input)) return;
+ 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)
{
if (!ecore_dev)
{
ERR("Failed to get source ecore device from event !\n");
- return;
+ goto end;
}
- if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
+ if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) goto end;
timestamp = libinput_event_touch_get_time(event);
edev->touch.pressed &= ~(1 << ev->multi.device);
ev->buttons = ((button & 0x00F) + 1);
-
- ecore_thread_main_loop_begin();
-
ev->dev = ecore_device_ref(ecore_dev);
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_CANCEL, ev, _e_input_event_mouse_button_cb_free, NULL);
+
+end:
ecore_thread_main_loop_end();
}
Eina_List *l;
E_Comp_Config *comp_conf;
+ ecore_thread_main_loop_begin();
+
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;
goto end;
}
- if (!(ev = calloc(1, sizeof(Ecore_Event_Axis_Update))))goto end;
+ if (!(ev = calloc(1, sizeof(Ecore_Event_Axis_Update)))) goto end;
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
if (comp_conf && comp_conf->input_log_enable)
ELOGF("Touch", "Axis (label: %d, value: %lf)", NULL, axis?axis->label:-1, axis?axis->value:0.0);
- ecore_thread_main_loop_begin();
-
ev->dev = ecore_device_ref(ecore_dev);
ecore_event_add(ECORE_EVENT_AXIS_UPDATE, ev, _e_input_aux_data_event_free, NULL);
- ecore_thread_main_loop_end();
end:
- ;
+ ecore_thread_main_loop_end();
}
E_Input_Evdev *