Revert "e_module: Add event handler for ECORE_WL_EVENT_INTERFACES_BOUND" 97/38397/5
authorDuna Oh <duna.oh@samsung.com>
Mon, 20 Apr 2015 09:10:00 +0000 (18:10 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 21 Apr 2015 04:58:42 +0000 (21:58 -0700)
This reverts commit 66a938c620c9101906796bda06d5b53b618ae74d.

Change-Id: I4d3ead40e3a85850df47ade37c5eaa3a9f28cc87

src/bin/e_comp_wl.c
src/bin/e_module.c

index 5dbac407cb5512ebf60803182979111dec48e446..efd9650d2a7d6d216b632e8bdd1217ea98d32d03 100644 (file)
@@ -83,6 +83,9 @@ _e_comp_wl_cb_module_idle(void *data)
 
    if (!(cdata = data)) return ECORE_CALLBACK_RENEW;
 
+   /* check if we are still loading modules */
+   if (e_module_loading_get()) return ECORE_CALLBACK_RENEW;
+
    if (!(mod = e_module_find("wl_desktop_shell")))
      mod = e_module_new("wl_desktop_shell");
 
index 1040929e3db4def611fd16a3b77ba9be0d0b3b12..8940c242ddd347a9a308fd78efd77a449dd93cc0 100644 (file)
@@ -24,7 +24,6 @@ static Ecore_Idle_Enterer *_e_module_idler = NULL;
 static Eina_List *_e_modules_delayed = NULL;
 static Eina_Bool _e_modules_initting = EINA_FALSE;
 static Eina_Bool _e_modules_init_end = EINA_FALSE;
-static Eina_Bool _e_modules_load_ready = EINA_FALSE;
 
 static Eina_List *_e_module_path_monitors = NULL;
 static Eina_List *_e_module_path_lists = NULL;
@@ -65,35 +64,11 @@ _module_main_cb(void *d, Eio_File *ls EINA_UNUSED, const Eina_File_Direct_Info *
    eina_stringshare_del(s);
 }
 
-#ifdef HAVE_WAYLAND_ONLY
-static Eina_Bool
-_module_wl_interfaces_bound(void *d EINA_UNUSED, int type, void *ev)
-{
-   if (type != ECORE_WL_EVENT_INTERFACES_BOUND) return ECORE_CALLBACK_RENEW;
-
-   if (_e_modules_load_ready) return ECORE_CALLBACK_RENEW;
-   _e_modules_load_ready = EINA_TRUE;
-   e_module_all_load();
-   if (!_e_modules_init_end)
-     {
-        ecore_event_add(E_EVENT_MODULE_INIT_END, NULL, NULL, NULL);
-        _e_modules_init_end = EINA_TRUE;
-     }
-
-   return ECORE_CALLBACK_RENEW;
-}
-#endif
-
 static void
 _module_done_cb(void *d EINA_UNUSED, Eio_File *ls)
 {
    _e_module_path_lists = eina_list_remove(_e_module_path_lists, ls);
    if (_e_module_path_lists) return;
-#ifdef HAVE_WAYLAND_ONLY
-   E_LIST_HANDLER_APPEND(handlers, ECORE_WL_EVENT_INTERFACES_BOUND,
-                         _module_wl_interfaces_bound, NULL);
-#endif
-   if (!_e_modules_load_ready) return;
    if (_e_modules_initting) e_module_all_load();
    else if (!_e_modules_init_end)
      {
@@ -772,7 +747,12 @@ _e_module_dialog_disable_show(const char *title, const char *body, E_Module *m)
 
    printf("MODULE ERR:\n%s\n", body);
 
-   dia = e_dialog_new(NULL, "E", "_module_unload_dialog");
+   /* FIXME: Stupid hack for ELM_WIN_DIALOG_BASIC not working in wayland */
+#warning REMOVE STUPID ELM HACK FOR WAYLAND BEFORE RELEASE
+   if (e_comp && e_comp->comp_type != E_PIXMAP_TYPE_WL)
+     dia = e_dialog_new(NULL, "E", "_module_unload_dialog");
+   else
+     dia = e_dialog_normal_win_new(NULL, "E", "_module_unload_dialog");
 
    EINA_SAFETY_ON_NULL_RETURN(dia);