Evas_Object *caller;
#ifdef HAVE_ELEMENTARY_WAYLAND
Evas_Object *cbhm_caller; //FIXME: remove when focus issue is resolved
+ Ecore_Job *cbhm_init_job;
#endif
Eina_Rectangle *viewport_rect;
Evas_Coord_Rectangle selection_rect;
Eina_Bool popup_clicked : 1;
Eina_Bool cursor_handler_shown : 1;
Eina_Bool ent_scroll : 1;
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ Eina_Bool cbhm_init_done : 1;
+#endif
Evas_Object *ctx_par;
Evas_Object *start_handler;
Evas_Object *end_handler;
static void
_clipboard_menu(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
- EINA_LOG_ERR("IN");
if(!ext_mod) return;
// start for cbhm
return 1; // succeed always
}
+#ifdef HAVE_ELEMENTARY_WAYLAND
+static void
+_init_eldbus_job(Evas_Object *obj)
+{
+ if (!ext_mod)
+ {
+ EINA_LOG_ERR("ext_mod is NULL");
+ return;
+ }
+ cbhm_eldbus_init(obj);
+ ext_mod->cbhm_init_done = EINA_TRUE;
+}
+#endif
+
// module funcs for the specific module type
EAPI void
obj_hook(Evas_Object *obj)
ext_mod->mouse_up = EINA_FALSE;
ext_mod->mouse_down = EINA_FALSE;
ext_mod->entry_move = EINA_FALSE;
+ ext_mod->cbhm_init_done = EINA_FALSE;
}
// Clipboard item: can be removed by application
elm_entry_context_menu_item_add(obj, "Clipboard", NULL,
ELM_ICON_STANDARD, NULL, NULL);
#endif
#ifdef HAVE_ELEMENTARY_WAYLAND
- cbhm_eldbus_init(obj);
+ if (ext_mod && 1 == _mod_hook_count)
+ {
+ if (ext_mod->cbhm_init_job)
+ {
+ ecore_job_del(ext_mod->cbhm_init_job);
+ ext_mod->cbhm_init_job = NULL;
+ }
+
+ ext_mod->cbhm_init_job = ecore_job_add((Ecore_Cb)_init_eldbus_job, obj);
+ }
#endif
}
#ifdef HAVE_ELEMENTARY_WAYLAND
EINA_LOG_ERR("call cbhm_eldbus_deinit");
+ if (ext_mod)
+ {
+ if (ext_mod->cbhm_init_job)
+ {
+ ecore_job_del(ext_mod->cbhm_init_job);
+ ext_mod->cbhm_init_job = NULL;
+ }
+ ext_mod->cbhm_init_done = EINA_FALSE;
+ }
+
cbhm_eldbus_deinit();
#endif
}
Ecore_X_Atom first_cbhm_item_type = 0;
Eina_Bool has_focused = EINA_FALSE;
+ if (!ext_mod->cbhm_init_done)
+ {
+ if (ext_mod->cbhm_init_job)
+ {
+ ecore_job_del(ext_mod->cbhm_init_job);
+ ext_mod->cbhm_init_job = NULL;
+ }
+
+ cbhm_eldbus_init(obj);
+ }
+
/*update*/
if (ext_mod->viewport_rect)
eina_rectangle_free(ext_mod->viewport_rect);