#include "e.h"
#include <Ecore_Drm.h>
+#include "Eeze.h"
#define PATH "/org/enlightenment/wm"
#define IFACE "org.enlightenment.wm.screen_rotation"
static Eina_List *event_handlers = NULL;
static Eina_Bool session_state = EINA_FALSE;
-static Eina_Bool dont_set_ecore_drm_keymap = EINA_FALSE;
+static Eina_Bool dont_set_e_input_keymap = EINA_FALSE;
static Eina_Bool dont_use_xkb_cache = EINA_FALSE;
E_API int E_EVENT_SCREEN_CHANGE = 0;
static Eina_Bool
_e_comp_screen_cb_input_device_add(void *data, int type, void *event)
{
- Ecore_Drm_Event_Input_Device_Add *e;
+ E_Input_Event_Input_Device_Add *e;
E_Comp *comp = data;
if (!(e = event)) goto end;
- if (e->caps & EVDEV_SEAT_POINTER)
+ if (e->caps & E_INPUT_SEAT_POINTER)
{
if (comp->wl_comp_data->ptr.num_devices == 0)
{
}
comp->wl_comp_data->ptr.num_devices++;
}
- if (e->caps & EVDEV_SEAT_KEYBOARD)
+ if (e->caps & E_INPUT_SEAT_KEYBOARD)
{
comp->wl_comp_data->kbd.num_devices++;
e_comp_wl_input_keyboard_enabled_set(EINA_TRUE);
}
- if (e->caps & EVDEV_SEAT_TOUCH)
+ if (e->caps & E_INPUT_SEAT_TOUCH)
{
e_comp_wl_input_touch_enabled_set(EINA_TRUE);
comp->wl_comp_data->touch.num_devices++;
static Eina_Bool
_e_comp_screen_cb_input_device_del(void *data, int type, void *event)
{
- Ecore_Drm_Event_Input_Device_Del *e;
+ E_Input_Event_Input_Device_Del *e;
E_Comp *comp = data;
if (!(e = event)) goto end;
- if (e->caps & EVDEV_SEAT_POINTER)
+ if (e->caps & E_INPUT_SEAT_POINTER)
{
comp->wl_comp_data->ptr.num_devices--;
if (comp->wl_comp_data->ptr.num_devices == 0)
e_pointer_hide(e_comp->pointer);
}
}
- if (e->caps & EVDEV_SEAT_KEYBOARD)
+ if (e->caps & E_INPUT_SEAT_KEYBOARD)
{
comp->wl_comp_data->kbd.num_devices--;
if (comp->wl_comp_data->kbd.num_devices == 0)
e_comp_wl_input_keyboard_enabled_set(EINA_FALSE);
}
}
- if (e->caps & EVDEV_SEAT_TOUCH)
+ if (e->caps & E_INPUT_SEAT_TOUCH)
{
comp->wl_comp_data->touch.num_devices--;
if (comp->wl_comp_data->touch.num_devices == 0)
*ctx = context;
*map = keymap;
- if (dont_set_ecore_drm_keymap == EINA_FALSE)
+ if (dont_set_e_input_keymap == EINA_FALSE)
{
- ecore_drm_device_keyboard_cached_context_set(*ctx);
- ecore_drm_device_keyboard_cached_keymap_set(*map);
+ e_input_device_keyboard_cached_context_set(*ctx);
+ e_input_device_keyboard_cached_keymap_set(*map);
}
cleanup:
}
/* keymap */
- dont_set_ecore_drm_keymap = getenv("NO_ECORE_DRM_KEYMAP_CACHE") ? EINA_TRUE : EINA_FALSE;
+ dont_set_e_input_keymap = getenv("NO_E_INPUT_KEYMAP_CACHE") ? EINA_TRUE : EINA_FALSE;
dont_use_xkb_cache = getenv("NO_KEYMAP_CACHE") ? EINA_TRUE : EINA_FALSE;
if (e_config->xkb.use_cache && !dont_use_xkb_cache)
goto failed_comp_screen;
}
- e_main_ts_begin("\tE_Comp_Wl Init");
+ if (!e_input_init(e_comp->ee))
+ {
+ ERR("Could not initialize the e_input.");
+ goto failed_comp_screen;
+ }
+
+ e_main_ts("\tE_Comp_Wl Init");
if (!e_comp_wl_init())
{
goto failed_comp_screen_with_ts;
tzsr_client_hook_del = e_client_hook_add(E_CLIENT_HOOK_DEL, _tz_screen_rotation_cb_client_del, NULL);
E_LIST_HANDLER_APPEND(event_handlers, ECORE_DRM_EVENT_ACTIVATE, _e_comp_screen_cb_activate, comp);
- E_LIST_HANDLER_APPEND(event_handlers, ECORE_DRM_EVENT_INPUT_DEVICE_ADD, _e_comp_screen_cb_input_device_add, comp);
- E_LIST_HANDLER_APPEND(event_handlers, ECORE_DRM_EVENT_INPUT_DEVICE_DEL, _e_comp_screen_cb_input_device_del, comp);
+ E_LIST_HANDLER_APPEND(event_handlers, E_INPUT_EVENT_INPUT_DEVICE_ADD, _e_comp_screen_cb_input_device_add, comp);
+ E_LIST_HANDLER_APPEND(event_handlers, E_INPUT_EVENT_INPUT_DEVICE_DEL, _e_comp_screen_cb_input_device_del, comp);
TRACE_DS_END();
e_main_ts_end("\tE_Comp_Screen init failed");
failed_comp_screen:
+ e_input_shutdown();
_e_comp_screen_engine_deinit();
TRACE_DS_END();
e_client_hook_del(tzsr_client_hook_del);
tzsr_client_hook_del = NULL;
- dont_set_ecore_drm_keymap = EINA_FALSE;
+ dont_set_e_input_keymap = EINA_FALSE;
dont_use_xkb_cache = EINA_FALSE;
E_FREE_LIST(event_handlers, ecore_event_handler_del);