static E_Text_Input *g_show_text_input = NULL;
static struct wl_client *g_show_client = NULL;
static Eina_Bool g_updated_geometry = EINA_FALSE;
+static Ecore_Idler *g_vconf_idler = NULL;
/* The candidate's show state that was requested by the application or IME */
static Eina_Bool g_show_state_candidate = EINA_FALSE;
return g_text_input->input_panel_show_requested;
}
+static Eina_Bool
+_vconf_idler_cb(void *user_data)
+{
+ LOGD("");
+
+ if (vconf_notify_key_changed(VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, _keyboard_mode_changed_cb, NULL) != 0)
+ LOGW ("Failed to register callback function for H/W keyboard input detection.");
+
+ g_vconf_idler = NULL;
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
E_API void *
e_modapi_init(E_Module *m)
{
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_RESIZE, _e_text_input_method_context_cb_client_resize, NULL);
- if (vconf_notify_key_changed(VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, _keyboard_mode_changed_cb, NULL) != 0)
- LOGW ("Failed to register callback function for H/W keyboard input detection.");
+ g_vconf_idler = ecore_idler_add(_vconf_idler_cb, NULL);
ecore_device_del_handler = ecore_event_handler_add(ECORE_EVENT_DEVICE_DEL, _e_mod_device_removed_cb, NULL);
ecore_device_del_handler = NULL;
}
+ if (g_vconf_idler)
+ {
+ ecore_idler_del(g_vconf_idler);
+ g_vconf_idler = NULL;
+ }
+
_e_mod_text_input_shutdown();
e_input_panel_shutdown();