E_Input_Event_Info *input_info = data;
Ecore_Device *ecore_dev = NULL;
- if (input_info->touch)
+ if (input_info->touch_event)
ecore_dev = _main_thread_mode_touch_device_get(input_info->evdev);
else
ecore_dev = _main_thread_mode_pointer_device_get(input_info->evdev);
Ecore_Event_Mouse_Wheel *ev = input_info->ev;
ev->dev = ecore_device_ref(ecore_dev);
}
+ else if (input_info->event_type == ECORE_EVENT_AXIS_UPDATE)
+ {
+ Ecore_Event_Axis_Update *ev = input_info->ev;
+ ev->dev = ecore_device_ref(ecore_dev);
+ }
else if (input_info->event_type == ECORE_EVENT_MOUSE_BUTTON_DOWN ||
input_info->event_type == ECORE_EVENT_MOUSE_BUTTON_UP ||
input_info->event_type == ECORE_EVENT_MOUSE_BUTTON_CANCEL)
E_Input_Backend *input;
Ecore_Event_Axis_Update *ev;
Ecore_Axis *axis;
- Ecore_Device *ecore_dev = NULL, *data;
- Eina_List *l;
E_Comp_Config *comp_conf;
uint32_t timestamp = 0;
int touch_value;
+ E_Input_Event_Info *input_event = NULL;
EINA_SAFETY_ON_NULL_RETURN(evdev);
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 (evdev->ecore_dev) ecore_dev = evdev->ecore_dev;
- else if (evdev->ecore_dev_list && eina_list_count(evdev->ecore_dev_list) > 0)
- {
- EINA_LIST_FOREACH(evdev->ecore_dev_list, l, data)
- {
- if (ecore_device_class_get(data) == ECORE_DEVICE_CLASS_TOUCH)
- {
- ecore_dev = data;
- break;
- }
- }
- }
- else
- {
- evdev->ecore_dev = e_input_evdev_ecore_device_get(evdev->path, ECORE_DEVICE_CLASS_TOUCH);
- ecore_dev = evdev->ecore_dev;
- }
-
- if (!ecore_dev)
- {
- ERR("Failed to get source ecore device from event !\n");
- goto end;
- }
-
- if (!(ev = calloc(1, sizeof(Ecore_Event_Axis_Update)))) goto end;
+ if (!(ev = calloc(1, sizeof(Ecore_Event_Axis_Update)))) return;
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
}
}
- ev->dev = ecore_device_ref(ecore_dev);
-
- ecore_event_add(ECORE_EVENT_AXIS_UPDATE, ev, _e_input_aux_data_event_free, NULL);
+ input_event = E_NEW(E_Input_Event_Info, 1);
+ input_event->touch_event = EINA_TRUE;
+ input_event->evdev = evdev;
+ input_event->ev = ev;
+ input_event->event_type = ECORE_EVENT_AXIS_UPDATE;
+ input_event->free_func = _e_input_aux_data_event_free;
+ input_event->free_func_data = NULL;
-end:
- ecore_thread_main_loop_end();
+ ecore_main_loop_thread_safe_call_async(_pointer_touch_ecore_event_add, input_event);
}
E_Input_Evdev *