static Eldbus_Service_Interface *e_comp_screen_iface;
static Eina_List *event_handlers = NULL;
+static Eina_List *output_hooks = NULL;
static Eina_Bool dont_set_e_input_keymap = EINA_FALSE;
static Eina_Bool dont_use_xkb_cache = EINA_FALSE;
return e_comp_screen->e_screens;
}
+#undef E_OUTPUT_HOOK_APPEND
+#define E_OUTPUT_HOOK_APPEND(l, t, cb, d) \
+ do \
+ { \
+ E_Output_Hook *_h; \
+ _h = e_output_hook_add(t, cb, d); \
+ assert(_h); \
+ l = eina_list_append(l, _h); \
+ } \
+ while (0)
+
+static void
+_e_comp_screen_cb_output_connect_status_change(void *data, E_Output *output)
+{
+ _e_comp_screen_size_update(e_comp->e_comp_screen);
+}
+
+static void
+_e_comp_screen_cb_output_mode_change(void *data, E_Output *output)
+{
+ _e_comp_screen_size_update(e_comp->e_comp_screen);
+}
+
EINTERN Eina_Bool
e_comp_screen_init()
{
E_LIST_HANDLER_APPEND(event_handlers, ECORE_EVENT_DEVICE_ADD, _e_comp_screen_cb_input_device_add, comp);
E_LIST_HANDLER_APPEND(event_handlers, ECORE_EVENT_DEVICE_DEL, _e_comp_screen_cb_input_device_del, comp);
+ E_OUTPUT_HOOK_APPEND(output_hooks, E_OUTPUT_HOOK_CONNECT_STATUS_CHANGE, _e_comp_screen_cb_output_connect_status_change, comp);
+ E_OUTPUT_HOOK_APPEND(output_hooks, E_OUTPUT_HOOK_MODE_CHANGE, _e_comp_screen_cb_output_mode_change, comp);
+
_e_comp_screen_input_rotation_set(e_comp->e_comp_screen->rotation);
return EINA_TRUE;
_e_comp_screen_deinit_outputs(e_comp->e_comp_screen);
+ E_FREE_LIST(output_hooks, e_output_hook_del);
+
e_client_hook_del(tzsr_client_hook_del);
tzsr_client_hook_del = NULL;