}
else if (e->clas == ECORE_DEVICE_CLASS_KEYBOARD)
{
- if (!e_input_thread_mode_get())
+ if (e_seat_keyboard_device_count(seat) == 0)
{
e_seat_keyboard_enabled_set(seat, EINA_TRUE);
- e_seat_keyboard_device_count_increase(seat);
}
+ e_seat_keyboard_device_count_increase(seat);
}
else if (e->clas == ECORE_DEVICE_CLASS_TOUCH)
{
+ if (e_seat_touch_device_count(seat) == 0)
+ {
+ e_seat_touch_enabled_set(seat, EINA_TRUE);
+ }
+ e_seat_touch_device_count_increase(seat);
+
E_Comp_Screen *comp_screen = e_comp_screen_get();
- e_seat_touch_enabled_set(seat, EINA_TRUE);
if (comp_screen)
_e_comp_screen_input_rotation_set(comp_screen->rotation);
- e_seat_touch_device_count_increase(seat);
}
end:
e_seat_touch_enabled_set(seat, EINA_FALSE);
}
}
+ else if (e->clas == ECORE_DEVICE_CLASS_KEYBOARD)
+ {
+ e_seat_keyboard_device_count_decrease(seat);
+ if (e_seat_keyboard_device_count(seat) == 0)
+ {
+ e_seat_keyboard_enabled_set(seat, EINA_FALSE);
+ }
+ }
end:
e_input_event_add(input_event_source, flag ? ECORE_EVENT_DEVICE_ADD : ECORE_EVENT_DEVICE_DEL, ecore_dev_info, _e_input_ecore_device_info_free, NULL);
}
-static void
-_e_input_add_ecore_device_keyboard_async_cb(void *data)
-{
- E_Seat *seat;
- const char *seatname = data;
-
- seat = e_seat_find(seatname);
- if (!seat) return;
- e_seat_keyboard_device_count_increase(seat);
- e_seat_keyboard_enabled_set(seat, EINA_TRUE);
-}
-
static Eina_Bool
_e_input_add_ecore_device(E_Input_Evdev *evdev, Ecore_Device_Class clas, Ecore_Device_Subclass subclas)
{
e_device_subclass_set(e_dev, subclas);
e_device_seatname_set(e_dev, seat_name);
- if (e_input_thread_mode_get())
- {
- if (clas == ECORE_DEVICE_CLASS_KEYBOARD)
- {
- ecore_main_loop_thread_safe_call_async(_e_input_add_ecore_device_keyboard_async_cb, (void *)seat_name);
- }
- }
-
if (!evdev->e_dev)
{
if (!evdev->e_dev_list || (g_list_length(evdev->e_dev_list) == 0))
E_FREE(dev_info);
}
-
-static void
-_e_input_remove_ecore_device_keyboard_async_cb(void *data)
-{
- E_Seat *seat;
- const char *seatname = data;
-
- seat = e_seat_find(seatname);
- if (!seat) return;
- e_seat_keyboard_device_count_decrease(seat);
- if (e_seat_keyboard_device_count(seat) == 0)
- e_seat_keyboard_enabled_set(seat, EINA_FALSE);
-}
-
static Eina_Bool
_e_input_remove_ecore_device(E_Input_Evdev *evdev, Ecore_Device_Class clas)
{
if ((e_device_class_get(device) == clas) && (!strcmp(device_identifier, evdev->path)))
{
- if (clas == ECORE_DEVICE_CLASS_KEYBOARD)
- {
- ecore_main_loop_thread_safe_call_async(_e_input_remove_ecore_device_keyboard_async_cb, (void *)seat_name);
- }
-
device_remove_log = eina_stringshare_printf("[Remove Device] device name(%s), identifier(%s), class(%s), subclass(%d), seatname(%s)",
e_device_name_get(device),
device_identifier,